Android启动画面一开始是白色的吗?

use*_*342 3 performance android

当我启动我的应用程序时,我会在启动闪屏之前看到白屏几秒钟.

我想知道我的应用程序的大小是否会影响它(它是17.7MB).或者是因为我的测试设备是旧的(HTC Desire HD)并且有太多数据被破坏了?

或者这是正常的行为?或者问题可能在我的代码中,这是在...

部分清单:

    <activity android:name=".SplashView"
          android:noHistory="true"
          android:screenOrientation="portrait"
          android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait" 
        android:windowSoftInputMode="adjustPan"
        android:configChanges="orientation" >
        <intent-filter >
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
Run Code Online (Sandbox Code Playgroud)

飞溅活动:

public class SplashView extends SherlockActivity {
private final int SPLASH_DISPLAY_LENGHT = 1000;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().hide();
    setContentView(R.layout.splash_view);
    try {
        RefreshRatingsTask urt = new RefreshRatingsTask();
        urt.execute();
    } catch (Exception e) {
        // ignore
    }
    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            Intent mainIntent = new Intent(SplashView.this,
                    MainActivity.class);
            SplashView.this.startActivity(mainIntent);
            SplashView.this.finish();
        }

    }, SPLASH_DISPLAY_LENGHT);
}
}
Run Code Online (Sandbox Code Playgroud)

谢谢

ale*_*lex 9

Android使用您的初始Activity的Theme来显示虚拟Activity,同时将应用程序加载到内存中.

使您的应用程序更小将有助于减少等待的长度,并使用主题设置启动屏幕的样式将使其不那么明显.

Cyril Mottier撰写的这篇博文有更多细节.