如何禁用通知栏的Andr​​oid应用程序? [英] how to disable notification bar for an android application?

查看:143
本文介绍了如何禁用通知栏的Andr​​oid应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,其中列出安装的应用程序,并推出他们的项目click.I要禁止从我的application.ie,当用户启动从我的应用程序的浏览器应用程序,就有可能拖垮通知访问NotificationBar酒吧和他/她可以改变GPS,WIFI等设置...我想这

I have an android application which lists installed applications and launch them on item click.I want to disable accessing NotificationBar from my application.ie,When user launch 'Browser' application from my application,it is possible to drag down the notification bar and he/she can change settings of gps,wifi etc...I tried this

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                    WindowManager.LayoutParams.FLAG_FULLSCREEN);

但它仅适用于我activity.How禁用通知栏为我的整个应用程序?

But it works only for my activity.How to disable Notification Bar for my whole application?

在此先感谢

推荐答案

您可以我们在你的Andr​​oidManifest.xml主题:

You could us a theme in your AndroidManifest.xml:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

这将隐藏标题栏

<activity android:name=".YourClassName"
android:theme="@android:style/Theme.NoTitleBar"/>

这篇关于如何禁用通知栏的Andr​​oid应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆