如果启动页不需要更换图片:
- 添加主题
<style name="Theme.SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowFullscreen">true</item>
<item name="android:fitsSystemWindows">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:clipToPadding">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
- 使用主题
<activity