List of usage examples for android.app ActionBar setDisplayHomeAsUpEnabled
public abstract void setDisplayHomeAsUpEnabled(boolean showHomeAsUp);
From source file:Main.java
/** * Setup parent navigation/*from w w w. jav a 2s. c o m*/ * @param activity to setup for */ public static void setupParent(Activity activity) { ActionBar bar = activity.getActionBar(); if (bar != null) { bar.setDisplayHomeAsUpEnabled(true); } }
From source file:Main.java
public static void setDisplayHomeAsUpEnabled(Activity activity, boolean b) { ActionBar actionBar = activity.getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(b); }//from w w w . j a v a 2 s.c om }
From source file:Main.java
public static boolean setDisplayHomeAsUpEnabled(ActionBar actionBar, boolean state) { if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(state); return true; } else {/*from w w w.j av a 2s.c om*/ return false; } }
From source file:Main.java
public static boolean setDisplayHomeAsUpEnabled(Activity act, boolean state) { ActionBar actionBar = act.getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(state); return true; } else {/*from www . ja va 2s .c o m*/ return false; } }
From source file:com.arantius.tivocommander.Utils.java
@TargetApi(11) public final static void activateHomeButton(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { ActionBar ab = activity.getActionBar(); ab.setDisplayHomeAsUpEnabled(true); }//from www .j a va2s . c o m }
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 ww w . j ava 2 s . co m*/ }
From source file:org.dmfs.webcal.PreferencesActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_preferences); getFragmentManager().beginTransaction().replace(R.id.pref_fragment_container, new PreferencesFragment()) .commit();/*from w w w. j a va2 s . c o m*/ ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); }
From source file:net.lacolaco.smileessence.activity.SettingActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { setTheme(Themes.getTheme(((Application) getApplication()).getThemeIndex())); super.onCreate(savedInstanceState); setContentView(R.layout.setting);//from ww w .j a v a 2s.c o m ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); }
From source file:com.drivehype.www.drivehype.ui.ImageGridActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { if (BuildConfig.DEBUG) { Utils.enableStrictMode();//from w ww . j av a 2 s. c o m } super.onCreate(savedInstanceState); Log.d("extraCount", "image gridactivity oncreate fired"); if (getSupportFragmentManager().findFragmentByTag(TAG) == null) { Log.d("extraCount", "image gridactivity find fragment is null"); final FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.add(android.R.id.content, new ImageGridFragment(), TAG); ft.commit(); } final ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); }
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); }