Updated 30 January 2018
In this blog, we are going to fix application white launch screen issue. Let take the example of youtube application where the user launches youtube application there is youtube icon appear instead of SplashScreen and then user redirect to the main page in between their is no splash Screen exit so we are going to achieve the same in this blog.
1 |
<item name="android:windowDisablePreview">false</item> |
2. Create layer-list and add image src in your bitmap tab inside the layer-list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:opacity="opaque"> <item android:drawable="@android:color/white" /> <item android:id="@+id/selected" android:drawable="@android:color/transparent" android:state_selected="true" /> <item android:id="@+id/usual" android:drawable="@color/md_white_1000" /> <item> <animated-selector android:fromId="@id/selected" android:toId="@id/usual" tools:targetApi="lollipop" /> </item> <item> <bitmap android:gravity="center" android:src="@drawable/launcher_splash" /> </item> </layer-list> |
3. Add windowBackground in your style.xml.
1 |
<item name="android:windowBackground">@drawable/splash_screen_backgroud</item> |
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.