From c1ee9e682a2f825e72260deb3f1c8579e21ed8de Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Fri, 4 Jul 2014 11:36:02 +0200 Subject: [PATCH] added action bar menu to start conversation --- res/menu/start_conversation.xml | 27 +++++++++++++++++++ res/values/strings.xml | 2 ++ .../conversations/ui/StartConversation.java | 21 +++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 res/menu/start_conversation.xml diff --git a/res/menu/start_conversation.xml b/res/menu/start_conversation.xml new file mode 100644 index 000000000..4c59f482e --- /dev/null +++ b/res/menu/start_conversation.xml @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 78961a56f..9662ee493 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -256,4 +256,6 @@ Verify Decrypt Conferences + Search + Create Contact diff --git a/src/eu/siacs/conversations/ui/StartConversation.java b/src/eu/siacs/conversations/ui/StartConversation.java index 9dccb4114..16161e36f 100644 --- a/src/eu/siacs/conversations/ui/StartConversation.java +++ b/src/eu/siacs/conversations/ui/StartConversation.java @@ -9,6 +9,12 @@ import android.app.ListFragment; import android.os.Bundle; import android.support.v13.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.PopupMenu; +import android.widget.PopupMenu.OnMenuItemClickListener; import eu.siacs.conversations.R; public class StartConversation extends XmppActivity { @@ -81,6 +87,21 @@ public class StartConversation extends XmppActivity { }); } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + getMenuInflater().inflate(R.menu.start_conversation, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + default: + break; + } + return super.onOptionsItemSelected(item); + } @Override void onBackendConnected() {