/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也没有这个属性

更多相关文章

  1. Android(安卓)Tablayout 的使用
  2. Android(安卓)xml资源文件animal动画解析
  3. Android中的实体类的正确用法
  4. Android自定义属性与自定义属性的获取
  5. android:layout_gravity和android:gravity属性的区别
  6. Android中自定义控件
  7. Android标题栏各种设置
  8. Android中全屏无标题设置(Android学习随笔十一)
  9. Android(安卓)- 设置带滚动条的TextView

随机推荐

  1. Android读取assets目录下文件数据内容
  2. Android 消息处理 -- Looper 、Handler类
  3. 条件数据库Android:sqllite使用
  4. Android(安卓)Debug Bridge( adb)介绍及
  5. Android 动画——Frame Animation与Tween
  6. 相对布局中取值为其他控件id 的属性及说
  7. android 使用contentobserver监听数据库
  8. Android的消息机制(java层)
  9. 开发 Standalone Android Java 应用程序
  10. 设置控件的透明度 ,android:layout_center