- this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉標題欄
- this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
- WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息欄
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉標題欄
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息欄
注意,這個設置必須放在設置佈局前面,不然會報錯.
- setContentView(R.layout.entrancebs);
setContentView(R.layout.entrancebs);
(二)去掉所有Activty界面的TitleBar
修改AndroidManifest.xml
在application 標籤中添加
- android:theme="@android:style/Theme.NoTitleBar"
android:theme="@android:style/Theme.NoTitleBar"
(三)去掉所有Activity界面的TitleBar 和StatusBar
修改AndroidManifest.xml
在application 標籤中添加
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"