我想隐藏平板电脑设备的系统栏。我找了很多,但没有成功。我为它添加了图像。
我找到了一些解决方案,比如
View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN); 但是我不知道怎么用它

我知道这是可能的,因为http://forum.xda-developers.com/showthread.php?t=1228046,有人知道怎么做吗?
发布于 2012-09-08 12:53:47
最后,经过长时间的搜索,我得到了一些我的需求的替代方案。
我知道这对程序员来说不是一个好主意,但由于我的时间限制,我使用了这种方式……
我发现这个链接和应用程序完全满足了我的要求
http://www.42gears.com/blog/2012/04/how-to-hide-bottom-bar-in-rooted-android-3-0-tablets-using-surelock/
如果您想在您的应用程序中使用此类型的要求,请访问此...
感谢所有帮助我解决问题的人……
发布于 2014-04-21 14:47:11
在安卓平板电脑上显示/隐藏状态栏的代码片段
要隐藏:
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 (Exception e) {
Log.w("Main","Failed to kill task bar (1).");
e.printStackTrace();
}
try {
proc.waitFor();
} catch (Exception e) {
Log.w("Main","Failed to kill task bar (2).");
e.printStackTrace();
}要显示以下内容:
Process proc = null;
try {
proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "am startservice -n com.android.systemui/.SystemUIService" });
} catch (Exception e) {
Log.w("Main","Failed to kill task bar (1).");
e.printStackTrace();
}
try {
proc.waitFor();
} catch (Exception e) {
Log.w("Main","Failed to kill task bar (2).");
e.printStackTrace();
}发布于 2012-08-15 02:04:21
无法隐藏系统栏。API中没有任何东西允许这样做。这是因为用户总是需要访问home和back键,以防应用程序冻结或做一些愚蠢的事情,而用户只需要退出应用程序。您只能隐藏操作栏。
https://stackoverflow.com/questions/11958034
复制相似问题