Hide ICS back home task switcher buttons Hide ICS back home task switcher buttons android android

Hide ICS back home task switcher buttons


pinxue is spot-on... you want SYSTEM_UI_FLAG_HIDE_NAVIGATION. Example:

myView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

One thing to note, though, is that upon any (and I mean ANY) user interaction the navigation bar will be reshown.

With Honeycomb the closest you can get is to go into "lights out" mode (now called "low profile"... SYSTEM_UI_FLAG_LOW_PROFILE ). This just makes the items on the navigation bar less visible (the little "dots" you've probably seen). If you want to do the best you can at maintain backwards compatibility with Honeycomb you can use reflection to use the "best" method:

// Ask the System Bar to hideint whichHiddenStatusToUse = android.view.View.STATUS_BAR_HIDDEN;try {    // if this next line doesn't thrown an exception then we are on ICS or      // above, so we can use the new field.    whichHiddenStatusToUse = View.class.getDeclaredField("SYSTEM_UI_FLAG_HIDE_NAVIGATION").getInt(mDrawingSurface);} catch (Exception ex) {}// now lets actually ask one of our views to request the decreased visibilitymyView.setSystemUiVisibility(whichHiddenStatusToUse);


try to setup a Full screen window with flag SYSTEM_UI_FLAG_HIDE_NAVIGATION


You want SYSTEM_UI_FLAG_HIDE_NAVIGATION .

This flag was added as of Ice Cream Sandwich, API 14. Previous to 14 a flag STATUS_BAR_HIDDEN was added in Honeycomb, API 11. Previous to that the soft navigation buttons didn't exist, so fullscreen modes were handled entirely by Themes (specifically Theme.NoTitleBar.Fullscreen).

Use:

if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH )    mBaseLayout.setSystemUiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION );else if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB )    mBaseLayout.setSystemUiVisibility( View.STATUS_BAR_HIDDEN );