如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar
来源:互联网 发布:跨境电商erp软件 编辑:程序博客网 时间:2024/06/07 23:42
1.ActionBar:
<activity android:name="Demo" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>2.TitleBar隐藏:requestWindowFeature(Window.FEATURE_NO_TITLE);或者
android:theme="@android:style/Theme.Black.NoTitleBar
显示:requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
3.NotificationBar、StatusBar、SystemBar
Dim的话可以:
getWindow().getDecorView().setSystemUiVisibility (View.SYSTEM_UI_FLAG_LOW_PROFILE);
隐藏的话可以(不好使,哈哈):
getWindow().getDecorView().setSystemUiVisibility (View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
那怎么玩呢?用狠招吧,哈哈:
命令行方式:
直接用进程号杀,不加service那个shell的话,一会SystemBar会自启动。
# kill com.android.systemui
# service call activity 79 s16 com.android.systemui
如果想启动SystemBar:
# am startservice -n com.android.systemui/.SystemUIService
代码方式:
要root啊,
Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 79 s16 com.android.systemui"});
proc.waitFor();
Process proc = Runtime.getRuntime().exec(new String[]{"am","startservice","-n","com.android.systemui/.SystemUIService"});
proc.waitFor();
转载自:http://blog.csdn.net/forlong401/article/details/7543928
- 如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar
- 如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar .
- 如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar
- 如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar
- 【Android4.0】SystemBar问题与StatusBar
- Android4.0 中 隐藏底部的statusBar
- Android4.0 中 隐藏底部的statusBar
- android4.0.3隐藏statusbar
- actionBar兼容2.1及以上版本的做法
- android4.0 statusbar的启动
- 设置statusbar的颜色,适用于SDK4.4版本及以上版本
- 关于StatusBar,TitleBar,ActionBar之间的区别以及他们的高度的计算。
- 获取android4.0以上版本的所有存储设备
- Android4.0以上版本OptionsMenu无法显示图标的问题
- Android4.0以上版本OptionsMenu无法显示图标的问题
- android4.0以上pad隐藏状态栏
- android4.0以上pad隐藏状态栏
- android4.0以上平板 隐藏状态栏
- 《COM技术内幕》读书笔记——第4章 引用计数
- 直接创建一个DataTable,并为之添加数据(自定义DataTable)
- linux系统wget命令的java代码实现
- 维护网络安全有妙招
- WsaAsyncSelect服务器端代码
- 如何隐藏Android4.0及以上版本的ActionBar、NotificationBar、StatusBar、SystemBar、TitleBar
- Linux内核学习的一些国外网站
- 抽象的操作系统(九) --- 硬件系统
- Spring安全权限管理(Spring Security)
- 使用UDEV在Oracle Linux 6上安装Oracle 11g RAC(11.2.0.3) (二)
- linux文件描述符open file descriptors与open files的区别
- horizon-页面title修改
- 内存泄露检测工具[VLD, LeakDiag]
- VLC播放器1.1.5版本使用方法新发现小结