Example usage for android.app ActionBar setDisplayShowTitleEnabled

List of usage examples for android.app ActionBar setDisplayShowTitleEnabled

Introduction

In this page you can find the example usage for android.app ActionBar setDisplayShowTitleEnabled.

Prototype

public abstract void setDisplayShowTitleEnabled(boolean showTitle);

Source Link

Document

Set whether an activity title/subtitle should be displayed.

Usage

From source file:com.google.cloud.genomics.android.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.
 *//*w w w .ja va2  s  . c om*/
private void showGlobalContextActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle(R.string.app_name);
}

From source file:cn.jasonlv.siri.fragment.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.
 *//*  www. j  a va 2s  . co  m*/
private void showGlobalContextActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
}

From source file:org.jorge.lolin1.ui.activities.DrawerLayoutFragmentActivity.java

protected void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    actionBar.setDisplayShowTitleEnabled(Boolean.TRUE);
    actionBar.setTitle(mTitle);/*from   w  ww.  j  a  v  a2s .c  om*/
}

From source file:com.SpitsinStafichuk.vkazam_remastered.DrawerActivity.java

public void restoreActionBar() {
    ActionBar actionBar = getActionBar();

    if (actionBar != null) {
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
        actionBar.setDisplayShowTitleEnabled(true);
        actionBar.setTitle(mTitle);//ww w . j a  v a 2  s .  c  om
    }
}

From source file:com.android.photos.GalleryActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mMultiChoiceManager = new MultiChoiceManager(this);
    mViewPager = new ViewPager(this);
    mViewPager.setId(R.id.viewpager);//from  ww w . j av a2s . c  o  m
    setContentView(mViewPager);

    ActionBar ab = getActionBar();
    ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    ab.setDisplayShowHomeEnabled(false);
    ab.setDisplayShowTitleEnabled(false);

    mTabsAdapter = new TabsAdapter(this, mViewPager);
    mTabsAdapter.addTab(ab.newTab().setText(R.string.tab_photos), PhotoSetFragment.class, null);
    mTabsAdapter.addTab(ab.newTab().setText(R.string.tab_albums), AlbumSetFragment.class, null);

    if (savedInstanceState != null) {
        ab.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
    }
}

From source file:com.yangtsaosoftware.pebblemessenger.activities.NavigationActivity.java

public void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
        actionBar.setDisplayShowTitleEnabled(true);
        actionBar.setTitle(mTitle);/*  w  w w  .ja  v  a 2  s  .  c  o m*/
    }

}

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:org.jorge.lolin1.ui.frags.NavigationDrawerFragment.java

private void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    actionBar.setDisplayShowTitleEnabled(Boolean.TRUE);
    actionBar.setTitle(LoLin1Utils.getString(getActivity(),
            "title_section" + (DrawerLayoutFragmentActivity.getLastSelectedNavDrawerIndex() + 1), "Home"));
}

From source file:org.mars3142.android.toaster.activity.MainActivity.java

private void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
        actionBar.setDisplayShowTitleEnabled(true);
        actionBar.setTitle(mTitle);//from w w  w. jav a  2s .  c  om
    }
}

From source file:net.sf.diningout.app.ui.RestaurantsActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ActionBar ab = getActionBar();
    ab.setDisplayShowTitleEnabled(false);
    ab.setNavigationMode(NAVIGATION_MODE_LIST);
    ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.restaurants_navigation, R.id.sort,
            res().getStringArray(R.array.restaurants_sort));
    adapter.setDropDownViewResource(R.layout.restaurants_navigation_item);
    ab.setListNavigationCallbacks(adapter, this);
    ab.setSelectedNavigationItem(mSort); // restore when rotating with navigation drawer open
    setContentView(R.layout.restaurants_activity);
    if (mDrawerLayout != null) {
        setDrawerLayout(mDrawerLayout);/*from   ww  w  . jav  a  2 s. c o m*/
    }
    /* set up the map if it was previously showing */
    MapFragment map = map();
    if (map != null) {
        map.getMapAsync(this);
    }
    getLoaderManager().initLoader(0, null, this); // need already to support config changes
}