- 代码形式:(需要写在setContentView前)
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//全屏尺寸
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//无标题
- XML形式:(两种Theme效果)
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" //全屏且无标题
android:theme="@android:style/Theme.NoTitleBar" //仅无标题