1、在style中自定义主题AppTheme.Splash
<style name="AppTheme.Splash">
<item name="android:windowBackground">@null</item>
<item name="android:windowDisablePreview">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
windowBackground和windowDisablePreview是关键。
2、在AndroidManifest.xml文件中新增自己启动页面的theme
<activity android:name=".ui.SplashActivity"
android:theme="@style/AppTheme.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
3、在启动页面中的onCreate添加
setTheme(R.style.AppTheme_Splash)