Like you, the pipe. First they show the icon screen instead of the white screen. And after 2 seconds it shows the initial screen.
first create an XML drawing in res / drawable.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/gray"/> <item> <bitmap android:gravity="center" android:src="@mipmap/ic_launcher"/> </item> </layer-list>
Then you set this as the background splash effect in the theme. Browse to the styles.xml file and add a new theme for your splash activity.
<resources> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/background_splash</item> </style> </resources>
In the new SplashTheme, set the window background attribute for your XML resource. Configure this as a burst activity theme in your AndroidManifest.xml:
<activity android:name=".SplashActivity" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
This link gives what you want. step by step procedure. https://www.bignerdranch.com/blog/splash-screens-the-right-way/
Abhi Nov 08 '16 at 8:58 2016-11-08 08:58
source share