added attach file action
This commit is contained in:
parent
cc977eee90
commit
7749103909
BIN
res/drawable-hdpi/ic_action_new_attachment.png
Normal file
BIN
res/drawable-hdpi/ic_action_new_attachment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 648 B |
BIN
res/drawable-mdpi/ic_action_new_attachment.png
Normal file
BIN
res/drawable-mdpi/ic_action_new_attachment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 468 B |
BIN
res/drawable-xhdpi/ic_action_new_attachment.png
Normal file
BIN
res/drawable-xhdpi/ic_action_new_attachment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 789 B |
BIN
res/drawable-xxhdpi/ic_action_new_attachment.png
Normal file
BIN
res/drawable-xxhdpi/ic_action_new_attachment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -14,6 +14,13 @@
|
||||||
android:icon="@drawable/ic_action_unsecure"
|
android:icon="@drawable/ic_action_unsecure"
|
||||||
android:title="@string/action_secure" />
|
android:title="@string/action_secure" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_attach_file"
|
||||||
|
android:orderInCategory="30"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
android:icon="@drawable/ic_action_new_attachment"
|
||||||
|
android:title="@string/action_attach_file" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_contact_details"
|
android:id="@+id/action_contact_details"
|
||||||
android:orderInCategory="40"
|
android:orderInCategory="40"
|
||||||
|
|
|
@ -47,4 +47,5 @@
|
||||||
<string name="problem_connecting_to_account">Unable to connect to account</string>
|
<string name="problem_connecting_to_account">Unable to connect to account</string>
|
||||||
<string name="problem_connecting_to_accounts">Unable to connect to multiple accounts</string>
|
<string name="problem_connecting_to_accounts">Unable to connect to multiple accounts</string>
|
||||||
<string name="touch_to_fix">Touch here to manage your accounts</string>
|
<string name="touch_to_fix">Touch here to manage your accounts</string>
|
||||||
|
<string name="action_attach_file">Attach file</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -234,6 +234,7 @@ public class ConversationActivity extends XmppActivity {
|
||||||
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
|
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
|
||||||
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
|
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
|
||||||
MenuItem menuInviteContacts = (MenuItem) menu.findItem(R.id.action_invite);
|
MenuItem menuInviteContacts = (MenuItem) menu.findItem(R.id.action_invite);
|
||||||
|
MenuItem menuAttach = (MenuItem) menu.findItem(R.id.action_attach_file);
|
||||||
|
|
||||||
if ((spl.isOpen()&&(spl.isSlideable()))) {
|
if ((spl.isOpen()&&(spl.isSlideable()))) {
|
||||||
menuArchive.setVisible(false);
|
menuArchive.setVisible(false);
|
||||||
|
@ -241,6 +242,7 @@ public class ConversationActivity extends XmppActivity {
|
||||||
menuContactDetails.setVisible(false);
|
menuContactDetails.setVisible(false);
|
||||||
menuSecure.setVisible(false);
|
menuSecure.setVisible(false);
|
||||||
menuInviteContacts.setVisible(false);
|
menuInviteContacts.setVisible(false);
|
||||||
|
menuAttach.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
|
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
|
||||||
if (this.getSelectedConversation()!=null) {
|
if (this.getSelectedConversation()!=null) {
|
||||||
|
@ -249,10 +251,12 @@ public class ConversationActivity extends XmppActivity {
|
||||||
menuContactDetails.setVisible(false);
|
menuContactDetails.setVisible(false);
|
||||||
menuSecure.setVisible(false);
|
menuSecure.setVisible(false);
|
||||||
menuInviteContacts.setVisible(true);
|
menuInviteContacts.setVisible(true);
|
||||||
|
menuAttach.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
menuContactDetails.setVisible(true);
|
menuContactDetails.setVisible(true);
|
||||||
menuMucDetails.setVisible(false);
|
menuMucDetails.setVisible(false);
|
||||||
menuInviteContacts.setVisible(false);
|
menuInviteContacts.setVisible(false);
|
||||||
|
menuAttach.setVisible(true);
|
||||||
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
|
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
|
||||||
menuSecure.setIcon(R.drawable.ic_action_secure);
|
menuSecure.setIcon(R.drawable.ic_action_secure);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue