When i launch my app, i see a white screen for couple of seconds before splash screen appears.
I am wondering if the size of my app can affect it ( it is 17.7MB ). Or is it because my testing device is old (HTC Desire HD) and a bit trashed with too much data in it?
Or it is normal behavior? Or maybe problem is in my code, which is below...
Part of the manifest:
<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>
Splash activity:
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);
}
}
thanks