List of usage examples for android.app ActionBar setDefaultDisplayHomeAsUpEnabled
public void setDefaultDisplayHomeAsUpEnabled(boolean enabled)
From source file:android.support.v7.app.AppCompatDelegateImplV7.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mWindowDecor = (ViewGroup) mWindow.getDecorView(); if (mOriginalWindowCallback instanceof Activity) { if (NavUtils.getParentActivityName((Activity) mOriginalWindowCallback) != null) { // Peek at the Action Bar and update it if it already exists ActionBar ab = peekSupportActionBar(); if (ab == null) { mEnableDefaultActionBarUp = true; } else { ab.setDefaultDisplayHomeAsUpEnabled(true); }//from w w w . jav a 2 s. c om } } }
From source file:android.support.v7.app.AppCompatDelegateImplV7.java
@Override public ActionBar createSupportActionBar() { ensureSubDecor();/*from w ww.ja v a 2s.c o m*/ ActionBar ab = null; if (mOriginalWindowCallback instanceof Activity) { ab = new WindowDecorActionBar((Activity) mOriginalWindowCallback, mOverlayActionBar); } else if (mOriginalWindowCallback instanceof Dialog) { ab = new WindowDecorActionBar((Dialog) mOriginalWindowCallback); } if (ab != null) { ab.setDefaultDisplayHomeAsUpEnabled(mEnableDefaultActionBarUp); } return ab; }
From source file:android.support.v7ox.app.AppCompatDelegateImplV7.java
@Override public void onCreate(Bundle savedInstanceState) { if (mOriginalWindowCallback instanceof Activity) { if (NavUtils.getParentActivityName((Activity) mOriginalWindowCallback) != null) { // Peek at the Action Bar and update it if it already exists ActionBar ab = peekSupportActionBar(); if (ab == null) { mEnableDefaultActionBarUp = true; } else { ab.setDefaultDisplayHomeAsUpEnabled(true); }//from w ww.ja v a2 s. com } } }