如果想同时隐藏标题栏和通知栏的话:
方法 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);//去掉标题栏 

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-02-07
  • 2022-01-24
  • 2022-02-07
  • 2021-09-25
  • 2022-02-07
  • 2021-11-16
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2022-02-07
  • 2021-06-11
相关资源
相似解决方案