Search code examples
androidsplash-screenpreferenceactivity

Splash screen covering PreferenceActivity


have an Activity extending PreferenceActivity opening like so, PreferenceActivity but when i add a splash screen to the app with:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowBackground">@drawable/splash_screen_frameup</item>
    <!-- Customize your theme here. -->
</style>

when i navigate to the PreferenceActivity, the toolbar remains but the whole screen is my splash screen (black screen)PreferenceActivity after apptheme background declaration. i have a feeling it is due to the PreferenceActivity not having a declared xml layout? how do i have the splash screen but not have it overlap the PreferenceActivity?


Solution

  • There seems to be high chance that your are using the same theme for PreferenceActivity too!

    Reason: windowBackground! Create another theme without windowBackground flag & assign that theme to PreferenceActivity...

    If that doesn't work, please elaborate more. :)