I have a problem with splash screen. I've started with drawable(let call it 'black' because it has black background) which was not very good so I've changed it to another(lets call it 'white').
The problem is, that the black drawable even appears for ~1 second, after that appears the 'white', after that retrofit finish request and MainActivity launches. I've tried to clean/rebuild, invalid cache, reinstall app. Nothing working. In similar SO questions I found that I should try to launch app in another device, but, unfortunately, I have only one, and have to work with it. So, is it possible to fix it, or it is a bug in Android Studio?
Manifest
<activity android:name=".ui.splash.SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
splash_drawable.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@android:color/white" />
</item>
<item
android:drawable="@drawable/gift"
android:gravity="center">
</item>
</layer-list>
SplashTheme
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/splash_drawable</item>
</style>
SplashTheme(v-21)
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/splash_drawable</item>
<item name="android:statusBarColor">@android:color/white</item>
</style>
sometimes android studio will not refresh the drawable files like images.so please close your android studio and restart it may solve the problem.