[英]Android kiosk mode app - running status bar
I've got a problem with status bar in kiosk mode App. 我在信息亭模式下的应用程序中出现状态栏问题。
I want to know how to hide status bar and I know that is it possible to disable it permanently in 4.4.2 Kitkat? 我想知道如何隐藏状态栏,并且可以在4.4.2 Kitkat中永久禁用它吗? But I found nice app -KioWare. 但是我发现了不错的应用-KioWare。
There is cool mode when I grab status bar down, it is running back to the top very quickly. 当我按下状态栏时,有一个很酷的模式,它很快就会回到顶部。 In 0.05 sec. 在0.05秒内 I am not able to click anything. 我无法点击任何东西。 And this is what I'm looking for. 这就是我想要的。
I can't buy this app because it's to expensive and I only need this magic trick with status bar. 我不能购买此应用程序,因为它太贵了,我只需要带有状态栏的魔术即可。 Anyone can help me ? 有人可以帮助我吗? It should be only few lines of code. 它应该只有几行代码。
I wrote an article that covers this question, but specifically for Lollipop. 我写了一篇文章,涵盖了这个问题,但专门针对棒棒糖。 I'm not sure if the immersive mode in Android 5 will also apply for 4.4.2, but it's something to try out maybe? 我不确定Android 5中的沉浸式模式是否也适用于4.4.2,但是也许可以尝试一下?
http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/ http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/
@Override
protected void onResume() {
super.onResume();
hideSystemUI();
}
// This snippet hides the system bars.
private void hideSystemUI() {
// Set the IMMERSIVE flag.
// Set the content to appear under the system bars so that the content
// doesn't resize when the system bars hide and show.
mDecorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.