List of usage examples for android.app ActionBar NAVIGATION_MODE_LIST
int NAVIGATION_MODE_LIST
To view the source code for android.app ActionBar NAVIGATION_MODE_LIST.
Click Source Link
From source file:dev.dworks.apps.anexplorer.DocumentsActivity.java
public void updateActionBar() { final ActionBar actionBar = getActionBar(); actionBar.setDisplayShowHomeEnabled(true); final boolean showIndicator = !mShowAsDialog && (mState.action != ACTION_MANAGE); actionBar.setDisplayHomeAsUpEnabled(showIndicator); if (mDrawerToggle != null) { mDrawerToggle.setDrawerIndicatorEnabled(showIndicator); }/*from ww w . j a v a 2 s .co m*/ if (isRootsDrawerOpen()) { actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setIcon(new ColorDrawable()); if (mState.action == ACTION_OPEN || mState.action == ACTION_GET_CONTENT || mState.action == ACTION_BROWSE) { actionBar.setTitle(R.string.app_name); actionBar.setIcon(R.drawable.ic_launcher); } else if (mState.action == ACTION_CREATE) { actionBar.setTitle(R.string.title_save); } } else { final RootInfo root = getCurrentRoot(); //actionBar.setIcon(root != null ? root.loadIcon(this) : null); if (mState.stack.size() <= 1) { actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(root.title); } else { mIgnoreNextNavigation = true; actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); actionBar.setTitle(null); actionBar.setListNavigationCallbacks(mStackAdapter, mStackListener); actionBar.setSelectedNavigationItem(mStackAdapter.getCount() - 1); } } }
From source file:net.lacolaco.smileessence.activity.MainActivity.java
private void initializeView() { ActionBar bar = getActionBar();/* ww w.j ava 2s .co m*/ bar.setDisplayShowHomeEnabled(true); bar.setDisplayShowTitleEnabled(false); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); viewPager = (ViewPager) findViewById(R.id.viewPager); pagerAdapter = new PageListAdapter(this, viewPager); initializePages(); }