不要试着给application添加style,虽然application默认帮你给所有activity设置属性但还是不能完美地给第一个activity设置背景(activity启动之前会显示默认application theme的背景)
在manifest或activity里面 设置style WelcomeTheme
<!-- Base application theme. --> <style name="BaseTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> <style name="WelcomeTheme" parent="BaseTheme"> <item name="android:background">@android:color/transparent</item> <item name="android:windowBackground">@mipmap/welcome</item> </style>