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:Main.java

public static boolean setDisplayShowTitleEnabled(ActionBar actionBar, boolean b) {

    if (actionBar != null) {
        actionBar.setDisplayShowTitleEnabled(b);
        return true;
    } else {//from   w w  w  .j av a2 s.co  m
        return false;
    }
}

From source file:Main.java

public static boolean setDisplayShowTitleEnabled(Activity act, boolean b) {

    ActionBar actionBar = act.getActionBar();
    if (actionBar != null) {
        actionBar.setDisplayShowTitleEnabled(b);
        return true;
    } else {/*from w  ww.  j a v  a2 s .  co m*/
        return false;
    }
}

From source file:me.barrasso.android.volume.activities.ConfigurationActivity.java

public static void setupActionBar(Activity activity) {

    // Tint the status bar, if available.
    SystemBarTintManager tintManager = new SystemBarTintManager(activity);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setTintColor(activity.getResources().getColor(R.color.action_bar_dark));

    ActionBar actionBar = activity.getActionBar();
    if (null != actionBar) {
        actionBar.setIcon(DateUtils.AppIcon());
        actionBar.setDisplayHomeAsUpEnabled(!activity.isTaskRoot());
        actionBar.setDisplayShowTitleEnabled(true);
    }/*from w ww  .  j  a v  a2 s.  c om*/
}

From source file:com.google.cloud.genomics.android.MainActivity.java

public void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle(title);
}

From source file:com.google.dartino.githubsample.MainActivity.java

public void restoreActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle(getTitle());
}

From source file:com.xortech.sender.MyPreferences.java

@SuppressWarnings("deprecation")
public void onCreate(Bundle paramBundle) {
    super.onCreate(paramBundle);
    addPreferencesFromResource(R.xml.preferences);

    // REMOVE THE TITLE BAR FROM THE ACTIONBAR
    ActionBar actionbar = getActionBar();
    actionbar.setDisplayHomeAsUpEnabled(true);
    actionbar.setDisplayShowTitleEnabled(false);
}

From source file:org.lee.android.activity.SearchActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_PROGRESS);
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);

    setContentView(R.layout.activity_search);

    SearchFragment search = new SearchFragment();
    Intent intent = getIntent();/*from   w  w  w .j a v a  2 s  . c o m*/
    search.setArguments(intent.getExtras());
    swichFragment(search, false);

}

From source file:com.github.riotopsys.malforandroid2.activity.DetailActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.i(TAG, "onCreate");
    setContentView(R.layout.detail_activity);

    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);

    if (savedInstanceState == null) {
        Intent intent = getIntent();//  w  w w . j a  va  2s . co m
        currentDetail = (ChangeDetailViewRequest) intent.getExtras().getSerializable("ITEM");
        transitionDetail(false);
    }

}

From source file:com.app.blockydemo.ui.fragment.BrickCategoryFragment.java

private void resetActionBar() {
    ActionBar actionBar = getActivity().getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle(this.previousActionBarTitle);
}

From source file:com.app.blockydemo.ui.fragment.BrickCategoryFragment.java

private void setUpActionBar() {
    ActionBar actionBar = getActivity().getActionBar();
    actionBar.setDisplayShowTitleEnabled(true);

    this.previousActionBarTitle = actionBar.getTitle();
    actionBar.setTitle(R.string.categories);
}