Cold start optimization

visual optimization

Define a Theme for the started activity

<style name="AppTheme.Launcher">
        <item name="android:windowBackground">@color/colorAccent</item>
    </style>
<activity android:name=".MainActivity"
            android:theme="@style/AppTheme.Launcher">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity

Then set it before super .onCreate(savedInstanceState); of MainActivity's onCreate 
setTheme(R.style.AppTheme);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326284266&siteId=291194637