android full screen
/come from google
If you only want to remove the title bar, add this line to onCreate() method of your activity:
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
If you want to set your activity to use the whole display screen, which means also remove the status bar, you need to add one more line:
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
translate by forverlove:
设置android 全屏,需要两步:1,去掉标题,2,去掉状态栏
1,去标题
在onCreate()事件中 添加 代码
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
2,去状态栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
但是后来试过之后发现只要一句就可以了
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
而且WindowManager.LayoutParams.FLAG_NO_STATUS_BAR也没有这个属性
更多相关文章
- android 网络视频代码
- android版本更新代码
- 系出名门 Android源代码
- Android标题栏各种设置
- Android应用程序安装过程源代码分析(3)
- Android开发——控件基础(七)ListView组件:示例代码
- Android 中 EditText 的 inputType 属性及其他常用属性详解
- Ubuntu 13.04 编译环境配置及android 2.3 源代码编译时出现了以