added attach file action

This commit is contained in:
Daniel Gultsch 2014-04-05 12:49:43 +02:00
parent cc977eee90
commit 7749103909
7 changed files with 12 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -14,6 +14,13 @@
android:icon="@drawable/ic_action_unsecure"
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
android:id="@+id/action_contact_details"
android:orderInCategory="40"

View File

@ -47,4 +47,5 @@
<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="touch_to_fix">Touch here to manage your accounts</string>
<string name="action_attach_file">Attach file</string>
</resources>

View File

@ -234,6 +234,7 @@ public class ConversationActivity extends XmppActivity {
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
MenuItem menuInviteContacts = (MenuItem) menu.findItem(R.id.action_invite);
MenuItem menuAttach = (MenuItem) menu.findItem(R.id.action_attach_file);
if ((spl.isOpen()&&(spl.isSlideable()))) {
menuArchive.setVisible(false);
@ -241,6 +242,7 @@ public class ConversationActivity extends XmppActivity {
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
menuInviteContacts.setVisible(false);
menuAttach.setVisible(false);
} else {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
if (this.getSelectedConversation()!=null) {
@ -249,10 +251,12 @@ public class ConversationActivity extends XmppActivity {
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
menuInviteContacts.setVisible(true);
menuAttach.setVisible(false);
} else {
menuContactDetails.setVisible(true);
menuMucDetails.setVisible(false);
menuInviteContacts.setVisible(false);
menuAttach.setVisible(true);
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
menuSecure.setIcon(R.drawable.ic_action_secure);
}