List of usage examples for android.view MenuItem SHOW_AS_ACTION_WITH_TEXT
int SHOW_AS_ACTION_WITH_TEXT
To view the source code for android.view MenuItem SHOW_AS_ACTION_WITH_TEXT.
Click Source Link
From source file:Main.java
public static void alwaysShowMenuItem(MenuItem add) { add.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); }
From source file:Main.java
public static void setShowMenuAsAction(MenuItem menuItem) { setShowMenuAsAction(menuItem, MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); }
From source file:com.anykey.balala.activity.BaseActivity.java
protected static void alwaysShowMenuItem(MenuItem add) { add.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); }
From source file:com.darsihmad.slideScreen.ScreenSlideActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.activity_screen_slide, menu); menu.findItem(R.id.action_previous).setEnabled(mPager.getCurrentItem() > 0); MenuItem item = menu.add(Menu.NONE, R.id.action_next, Menu.NONE, (mPager.getCurrentItem() == mPagerAdapter.getCount() - 1) ? R.string.action_finish : R.string.action_next); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true;//from w w w . ja v a2s.c o m }
From source file:us.opcam.camera.activity.URLImagePagerActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { if (bThisPicMine) // ? ? ? {/* ww w . j a va2s . c o m*/ menu.add("Delete").setIcon(R.drawable.icon_delete) .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); } return super.onCreateOptionsMenu(menu); }
From source file:com.example.ScreenSlideActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.activity_screen_slide, menu); menu.findItem(R.id.action_previous).setEnabled(mPager.getCurrentItem() > 0); // Add either a "next" or "finish" button to the action bar, depending on which page // is currently selected. MenuItem item = menu.add(Menu.NONE, R.id.action_previous, Menu.NONE, (mPager.getCurrentItem() == mPagerAdapter.getCount() - 1) ? "Finalizar" : "Siguiente"); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true;/* w ww . j a v a2s . co m*/ }
From source file:com.team.agita.langeo.ActivitySlideShow.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.activity_screen_slide, menu); menu.findItem(R.id.action_previous).setEnabled(mPager.getCurrentItem() >= 0); // Add either a "next" or "finish" button to the action bar, depending on which page // is currently selected. MenuItem item = menu.add(Menu.NONE, R.id.action_next, Menu.NONE, (mPager.getCurrentItem() == mPagerAdapter.getCount() - 1) ? R.string.action_finish : R.string.action_next); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true;/*w ww .j av a2 s .co m*/ }
From source file:android.example.com.animationdemos.ScreenSlideActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.activity_screen_slide, menu); menu.findItem(R.id.action_previous).setEnabled(mPager.getCurrentItem() > 0); // Add either a "next" or "finish" button to the action bar, depending on which page // is currently selected. MenuItem item = menu.add(Menu.NONE, R.id.action_next, Menu.NONE, (mPager.getCurrentItem() == mPagerAdapter.getCount() - 1) ? R.string.action_finish : R.string.action_next); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true;//from ww w . ja v a 2 s. co m }
From source file:com.gsc.testing.espresso.espressotesting.ScreenSlideActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); // getMenuInflater().inflate(R.menu.activity_screen_slide, menu); menu.findItem(R.id.action_previous).setEnabled(mPager.getCurrentItem() > 0); // Add either a "next" or "finish" button to the action bar, depending on which page // is currently selected. MenuItem item = menu.add(Menu.NONE, R.id.action_next, Menu.NONE, (mPager.getCurrentItem() == mPagerAdapter.getCount() - 1) ? R.string.action_finish : R.string.action_next); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true;/* w w w . ja v a 2s .c o m*/ }
From source file:com.shafiq.mytwittle.view.TutorialActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); int currentItem = mViewPager.getCurrentItem(); if (currentItem != PAGE_WELCOME) { menu.add(getString(R.string.action_previous)) .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override// w ww . java2 s . c om public boolean onMenuItemClick(MenuItem item) { mViewPager.setCurrentItem(mViewPager.getCurrentItem() - 1); return true; } }).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); } if (currentItem != PAGE_THANKS) { menu.add(getString(R.string.action_next)) .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { mViewPager.setCurrentItem(mViewPager.getCurrentItem() + 1); return true; } }).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); } return true; }