Reputation: 325
I created a Splash screen
and it works fine. The only problem is that before the Activity
with the background image is displayed, for a second, a screen appears with the default theme of Android and the background of the app. What can I do to stop this screen appearing on startup?
thanks
StartActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.inicio);
tareaAsincInicio = new tareaAsincronaInicio();
tareaAsincInicio.execute();
}
Styles
<style name="AppTheme2" parent="android:Theme.Holo">
<item name="android:windowBackground">@drawable/app_background</item>
</style>
Upvotes: 1
Views: 1567
Reputation: 685
give this custom_title_splash_theme to your Splash Activity in manifest
<style name="custom_title_splash_theme" parent="android:Theme">
<item name="android:windowDisablePreview">true</item>
</style>
or simply add this in your style
<item name="android:windowDisablePreview">true</item>
Upvotes: 3