I'm working in a launcher for Android ICS but I have a problem with tablets.
I can't hide the status bar. I have try it in Android 2.3.X and it's ok. The problem appears only with Android 4.0.
How can I hide it?
I'm working in a launcher for Android ICS but I have a problem with tablets.
I can't hide the status bar. I have try it in Android 2.3.X and it's ok. The problem appears only with Android 4.0.
How can I hide it?
You cannot get rid of the system bar on tablets. You may be able to get rid of the navigation bar and status bar on phones. Please read the "Controls for system UI visibility" section of the Android 4.0 SDK release notes.
STATUS_BAR_HIDDEN
or SYSTEM_UI_FLAG_LOW_PROFILE
with setSystemUiVisibility()
on any View
. –
Anasarca You can not get 100% true full screen in Android 4.0.
Use the following to dim the notification bar (aka. status bar, system bar)
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
And use this to hide it
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
And, if I guess right, you are trying to achieve a "kiosk mode". You can get a little help with an app named "surelock". This blocks all the "home" and "back" actions.
It is still not perfect but this may be the best we can achieve with Android ICS.
It is possible to hide the statusbar on a rooted android device. The program Hidebar does this by killing the systemui process. The program is open source, so you can read all about it in the source code.
You cannot get rid of the system bar on tablets. You may be able to get rid of the navigation bar and status bar on phones. Please read the "Controls for system UI visibility" section of the Android 4.0 SDK release notes.
STATUS_BAR_HIDDEN
or SYSTEM_UI_FLAG_LOW_PROFILE
with setSystemUiVisibility()
on any View
. –
Anasarca I know my answer comes a bit late, but after assembling info from various places, I came up with this, which works ONLY ON ROOTED DEVICES:
private void KillStatusBar()
{
Process proc = null;
String ProcID = "79"; //HONEYCOMB AND OLDER
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){
ProcID = "42"; //ICS AND NEWER
}
try {
proc = Runtime
.getRuntime()
.exec(new String[] { "su", "-c",
"service call activity "+ProcID+" s16 com.android.systemui" });
} catch (IOException e) {
Log.w(TAG,"Failed to kill task bar (1).");
e.printStackTrace();
}
try {
proc.waitFor();
} catch (InterruptedException e) {
Log.w(TAG,"Failed to kill task bar (2).");
e.printStackTrace();
}
}
This should eliminate the bottom bar on any rooted device and turn it into "kiosk" mode.
To hide status bar and navigation bar in android 4.0, we should use code below:
LinearLayout layout = (LinearLayout)findViewById(R.id.layout);
layout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Building upon ppareit's answer.
You can not hide the navigation bar on most stock devices. However, there is a work around if you rooting the device is an option. Here are the steps for one solution:
In HideBar there is an option to run in 'Kiosk' mode, in which there is no way to re-display the navigation bar. Needless to say, you really need to be careful with this.
© 2022 - 2024 — McMap. All rights reserved.