aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-04 14:22:17 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-10 00:53:43 +0200
commit7c3f3b2a3e878b1b1cfdcca102a38efe033dc6b7 (patch)
tree9629dc118d4b861d079cd7b8368a84e891c59b0b /src/eu/siacs/conversations
parentc1ee9e682a2f825e72260deb3f1c8579e21ed8de (diff)
added group add button
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r--src/eu/siacs/conversations/ui/StartConversation.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/ui/StartConversation.java b/src/eu/siacs/conversations/ui/StartConversation.java
index 16161e36..ba603819 100644
--- a/src/eu/siacs/conversations/ui/StartConversation.java
+++ b/src/eu/siacs/conversations/ui/StartConversation.java
@@ -9,12 +9,8 @@ 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 {
@@ -36,6 +32,7 @@ public class StartConversation extends XmppActivity {
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
mViewPager.setCurrentItem(tab.getPosition());
+ invalidateOptionsMenu();
}
@Override
@@ -49,6 +46,7 @@ public class StartConversation extends XmppActivity {
@Override
public void onPageSelected(int position) {
getActionBar().setSelectedNavigationItem(position);
+ invalidateOptionsMenu();
}
};
@@ -91,6 +89,13 @@ public class StartConversation extends XmppActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.start_conversation, menu);
+ MenuItem menuCreateContact = (MenuItem) menu.findItem(R.id.action_create_contact);
+ MenuItem menuCreateConference = (MenuItem) menu.findItem(R.id.action_create_conference);
+ if (getActionBar().getSelectedNavigationIndex() == 0) {
+ menuCreateConference.setVisible(false);
+ } else {
+ menuCreateContact.setVisible(false);
+ }
return true;
}