Android 全屏显示(代码)

在AndroidManifest.xml中加入

<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

 

或者在代码中修改如下(未验证)

requestWindowFeature(Window.FEATURE_NO_TITLE); 

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