I added a bottom-image to my splash-screen and found a nice new challenge because I don't get status-bar and navigation-bar in balance now
My splash screen is realised by the theme of my launcher activity and I load the app theme when my activity is created and ready.
So I don't use an extra splash activity.
The style looks like this:
<style name="splashscreen" parent="android:Theme.NoTitleBar">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowFullscreen">false</item>
</style>
The splash_screen-drawable:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<!-- color of spaces not covered by the image -->
<color android:color="#0f0" />
</item>
<!-- the image in the center of the screen -->
<item android:gravity="center" android:drawable="@mipmap/splash_image"/>
<!-- the image at the bottom-end of the screen-->
<item android:gravity="bottom|end" android:drawable="@mipmap/inspired" android:end="15dp" android:bottom="20dp"/>
</layer-list>
This results in a view like that:
splash without status-bar color
This is quite nice, but the status-bar at the top of the screen is black :-( as android:statusBarColor has no effect here alone I have to add
<item name="android:statusBarColor">#f00</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
but then my splash-screen becomes "longer" somehow and gets overlapped by the navigation-bar at the bottom of the screen:
splash overlapped by navigation bar
The only parameter I found changing anything an this view was
<item name="android:windowTranslucentNavigation">true</item>
but then you even can't read the text:
So my wish is to show the status-bar in same-color as my splash-background because it's just beautiful and fullscreen is no option because I really want status-bar with icons being visible
And my splash should end before the navigation-bar so nothing overlaps anything else.
I also tried other base-themes but android:Theme.xxx were the only without this overlapping at bottom (as long I don't try to set the status-bar-color)
Any suggestions or solutions?
As I saw in an other thread was, it's a difference to set android:windowBackground or android:background and when I user android:background it's working for the splash screen but then even a toast has the same background