隐藏通知栏 [英] Hide Notification bar
本文介绍了隐藏通知栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道如何禁用/隐藏通知栏处显示电池和其他的东西在机器人顶部。 任何帮助将AP preciated。
Anyone know how to disable/hide notification bar at the top which show battery and other things in android. Any help will be appreciated.
编辑:请还加我怎么能隐藏动作条+ NotificationBar供以后的Android版本
Please also add how can I hide ActionBar+NotificationBar for later android versions.
推荐答案
您可以我们在你的AndroidManifest.xml主题:
You could us a theme in your AndroidManifest.xml:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
或者使用下面的code片断:
or use the following code snippet:
public class FullScreen
extends android.app.Activity
{
@Override
public void onCreate(android.os.Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
这篇关于隐藏通知栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文