这里暂时只给出一种方法,在java代码中去除

1.继承Activity

在onCreate方法中

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏

这句要写在 setContentView() 前面

Android------去除标题栏

 

 

2.继承AppCompatActivity

和1.同理,但把上面那句改成下面的这句

  getSupportActionBar().hide();
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

 

相关文章:

  • 2022-12-23
  • 2021-04-18
  • 2021-09-22
  • 2022-12-23
  • 2021-12-15
  • 2021-11-13
  • 2022-12-23
  • 2021-04-12
猜你喜欢
  • 2021-10-31
  • 2021-07-23
  • 2022-02-07
  • 2021-12-18
  • 2022-02-09
相关资源
相似解决方案