方法一:

this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏

注意,这个设置必须放在设置布局前面,不然会报错.

setContentView(R.layout.entrancebs);

 

方法二:

在AndroidManifest.xml 里面

 

隐藏信息栏和标题栏:

<activity android:name=".Login" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >

隐藏标题栏:

 <activity android:name=".Login" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar" >

相关文章:

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