在styles.xml里添加
<style name="FullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">true</item> <item name="android:windowActionBar">false</item> </style>
再将AndroidManifest.xml里的
android:theme="@style/AppTheme"改为
android:theme="@style/FullScreenTheme"即可