直接上代码:
方法一(代码中添加)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//隐去电池等图标和一切修饰部分(状态栏部分)
this.requestWindowFeature(Window.FEATURE_NO_TITLE); 隐去标题栏(程序的名字)
setContentView(R.layout.activity_main);
} 方法二(配置文件manifest.xml中配置)
android:theme="@android:style/Theme.NoTitleBar" 隐去标题栏
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 隐去状态栏
|
|