隐藏平板电脑系统栏

Chi*_*tel 14 android statusbar tablet android-3.0-honeycomb

我想隐藏平板电脑设备的系统栏.我搜索了很多但没有成功.我为它添加了图像.

我找到了一些解决方案

View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN); 
Run Code Online (Sandbox Code Playgroud)

但我不知道如何使用它 在此输入图像描述

我知道这可能是http://forum.xda-developers.com/showthread.php?t=1228046任何人都知道如何做到这一点?

Bas*_*r51 7

代码片段显示/隐藏root用户安卓平板电脑上的状态栏

隐藏:


            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();
            }
Run Code Online (Sandbox Code Playgroud)

显示:


            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();
            }
Run Code Online (Sandbox Code Playgroud)


Chi*_*tel 4

最后,经过长时间的搜索,我找到了一些满足我要求的替代方案。

我知道对于程序员来说,摆脱这种情况并不是一个好主意,但由于我的时间限制,我使用了这种方式......

我发现这个链接和应用程序满足我的要求

http://www.42gears.com/blog/2012/04/how-to-hide-bottom-bar-in-rooted-android-3-0-tablets-using-surelock/

如果您希望在您的应用程序中满足此类要求,请访问此一次......

感谢大家帮助我解决我的问题...