List of usage examples for android.app ActionBar NAVIGATION_MODE_STANDARD
int NAVIGATION_MODE_STANDARD
To view the source code for android.app ActionBar NAVIGATION_MODE_STANDARD.
Click Source Link
From source file:org.mars3142.android.toaster.fragment.NavigationDrawerFragment.java
private void showGlobalContextActionBar() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); }
From source file:com.emman.tame.MainActivity.java
public void restoreActionBar() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.action_bar); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setDisplayShowTitleEnabled(true); actionBar.setTitle(mTitle);/* w w w . j a v a2 s . c o m*/ }
From source file:fr.cph.chicago.activity.BusActivity.java
@Override public final boolean onCreateOptionsMenu(final Menu menu) { super.onCreateOptionsMenu(menu); this.mMenu = menu; // Inflate menu with no search MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main_no_search, menu); // Modify action bar title ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setDisplayShowTitleEnabled(true); actionBar.setTitle("Bus"); // Load top bar animation MenuItem refreshMenuItem = menu.findItem(R.id.action_refresh); refreshMenuItem.setActionView(R.layout.progressbar); refreshMenuItem.expandActionView();//from w ww . jav a 2 s . c o m return true; }
From source file:org.jorge.lolin1.ui.frags.NavigationDrawerFragment.java
/** * Per the navigation drawer design guidelines, updates the action bar to show the actionbar app * 'context', rather than just what's in the current screen. *//*from w w w. j av a2s .co m*/ private void showGlobalContextActionBar() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(Boolean.TRUE); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); }
From source file:org.floens.chan.ui.activity.BoardActivity.java
private void updateActionBarStateCallback() { final ActionBar actionBar = getActionBar(); if (threadPane.isSlideable()) { if (threadPane.isOpen()) { int index = getBoardIndexNavigator(boardLoadable.board); if (index >= 0) { // actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); setActionBarListMode();//from w w w. j av a2 s . c o m actionBar.setTitle(""); } else { actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); String niceTitle = ChanApplication.getBoardManager().getBoardKey(boardLoadable.board); if (niceTitle == null) { actionBar.setTitle("/" + boardLoadable.board + "/"); } else { actionBar.setTitle(niceTitle); } } actionBar.setHomeButtonEnabled(true); pinDrawerListener.setDrawerIndicatorEnabled(true); if (boardLoadable.isBoardMode()) setShareUrl(ChanUrls.getBoardUrlDesktop(boardLoadable.board)); } else { actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(threadLoadable.title); pinDrawerListener.setDrawerIndicatorEnabled(false); if (threadLoadable.isThreadMode()) setShareUrl(ChanUrls.getThreadUrlDesktop(threadLoadable.board, threadLoadable.no)); } actionBar.setDisplayHomeAsUpEnabled(true); } else { setActionBarListMode(); // actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); pinDrawerListener.setDrawerIndicatorEnabled(true); actionBar.setTitle(threadLoadable.title); actionBar.setDisplayHomeAsUpEnabled(true); if (threadLoadable.isThreadMode()) setShareUrl(ChanUrls.getThreadUrlDesktop(threadLoadable.board, threadLoadable.no)); } actionBar.setDisplayShowTitleEnabled(true); invalidateOptionsMenu(); }
From source file:org.dmfs.webcal.fragments.GenericListFragment.java
@Override public void setupActionBar() { if (getParentFragment() == null) // the topmost fragment owns the action bar {/* w ww .j a v a 2s. c o m*/ ActionBar ab = getActivity().getActionBar(); ab.removeAllTabs(); ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); FragmentActivity activity = getActivity(); activity.setTitle(mTitle); activity.getActionBar().setTitle(mTitle); } }
From source file:com.mastercard.masterpasswallet.fragments.NavigationDrawerFragment.java
/** * Per the navigation drawer design guidelines, updates the action bar to show the global app * 'context', rather than just what's in the current screen. *///from www . j av a 2s .c om private void showGlobalContextActionBar() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); }
From source file:fr.cph.chicago.activity.BusBoundActivity.java
@Override public final boolean onCreateOptionsMenu(final Menu menu) { super.onCreateOptionsMenu(menu); ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setDisplayShowTitleEnabled(true); actionBar.setTitle(this.mBusRouteName + " (" + this.mBound + ")"); return true;//from www . ja v a 2s.c o m }
From source file:com.actionbarsherlock.sample.styled.MainActivityICS.java
private void showStandardNav() { ActionBar ab = getActionBar();/* w ww. ja v a 2s . com*/ if (ab.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD) { ab.setDisplayShowTitleEnabled(true); ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); } }
From source file:org.dmfs.webcal.fragments.PagerFragment.java
@Override public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) { mAdapter.swapCursor(cursor);//from w w w. j av a 2s . c o m if (cursor == null) { // this indicates an error when loading the page, show an error message mMessageText.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.GONE); mViewPager.setVisibility(View.GONE); } else if (cursor.getCount() > 0) { // indicates the page has been loaded, hide progress indicator and show pager mMessageText.setVisibility(View.GONE); mProgressBar.setVisibility(View.GONE); mViewPager.setVisibility(View.VISIBLE); setupActionBarTabs(); } else { // all pages must have at least one section, 0 results means we're still waiting for the page to load, show a progress indicator Activity activity = getActivity(); mProgressBar.setVisibility(View.VISIBLE); activity.getActionBar().removeAllTabs(); activity.getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); } }