// SplashActivity
onCreate
setContentView(R.layout.activity_splash);
startActivity(new Intent(SplashActivity.this, HomeActivity.class));
// activity_splash.xml
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"/>
// Android Manifest。 XML
<activity
android:name=".common.activity.SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
// SplashTheme
<style name="SplashTheme" parent="TransparentStatusbar">
<item name="android:windowBackground">@drawable/splash_drawable</item>
</style>
// splash_drawable.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item
android:drawable="@color/edit_text_background"/> //color code : #20FFFFFF
<item>
<bitmap
android:gravity="center"
android:src="@drawable/logo"/>
</item>
</layer-list>