Android启动白屏解决方案
原文链接:Easy Android: Launch screen
style文件配置
**< **item name=”android:windowBackground” > @drawable/launch_screen < /item >
<---! launch_screen.xml --->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/background_material_light" />
</item>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/ic_app_logo"
android:tileMode="disabled" />
</item>
</layer-list>
启动的Activity设置主题为设置了windowBackground属性的主题
<--! AndroidManifest.xml -->
<activityandroid:name=".MainActivity"
android:label="@string/app_name"**
android:theme="@style/PartyTheme"** >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>