如果想同时隐藏标题栏和通知栏的话:
方法 1、 在manifest里面的activity加
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
方法2、 在activity的onCreate方法写入以下代码:
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
如果只是想隐藏标题栏的话:
方法 1、 在manifest里面的activity加
android:theme="@android:style/Theme.NoTitleBar"
方法2、 在activity的onCreate方法写入以下代码:
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏



更多相关文章

  1. adb命令执行java代码
  2. location of the android sdk has not been setup in the prefer
  3. wm命令使用方法(修改android 分辨率)修改
  4. android中在子线程中更新UI的几种方法
  5. Android Studio调错误方法
  6. Android动态设置Margin的方法
  7. 完美解决Android Studio在写XML布局的时候没有了控件代码提示的

随机推荐

  1. Android读写文件示例
  2. android custom viewgroups 性能分析
  3. Android(安卓)valueAnimator和ObjectAnim
  4. Android中Broadcast的Intent大全
  5. Android涂鸦
  6. Android创建文件夹及文件并写入数据
  7. Android(安卓)studio 点击跳转WedView
  8. android SQLite的CRUD
  9. Android(安卓)动态更改Shape(GradientDraw
  10. 巧妙均分TabLayout tab