Android 启动页替换背景图解决白屏问题
1.图片放在drawable目录下
2.themes.xml 中创建一个style
<style name="Theme.Splash" parent="Theme.xxx">
<item name="android:windowBackground">@drawable/xxx</item>
<item name="android:windowFullscreen">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
3.AndroidManifest中android:name=".MainActivity"
后添加android:theme="@style/Theme.Splash"
<activity
android:name=".MainActivity" android:theme="@style/Theme.Splash">
4.MainActivity内:onCreate方法内第一行(super.onCreat()
之前)添加:setTheme(R.style.Theme)
(parentTheme)