- 设置全屏
//无标题栏
requestWindowFeature(Window.FEATURE_NO_TITLE);
//全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCRE
或者
在 Activity theme 设置style 即可
true
2. APP启动白屏、黑屏的问题
默认情况下 activity 启动的时候先把屏幕刷成白色,再绘制界面。 在 Activity theme 设置style 即可
<style name="AppTheme" parent="android:Theme.Light.NoTitleBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowBackground">@android:color/transparent</item>
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
或者在app的启动app设置
@drawable/welcome_bg