在anroid 的AndroidManifest.xml里添加
<application
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"去掉頂部title和狀態欄全屏
android:icon="@drawable/icon" android:label="@string/app_name">
</application>
手動寫添加的話比較麻煩,基本每個activity里面都要寫下面的代碼
//取消頂部標題
requestWindowFeature(Window.FEATURE_NO_TITLE);
//設置全屏
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,WindowManager.LayoutParams. FLAG_FULLSCREEN);