I would like to use this splash screen but it keep going under the navigation bar.
Splash img
How can I force it to fit on the screen while keeping the navigation bar?
<style name="splashScreenTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">
<item name="android:windowBackground">@drawable/splash</item>
</style>
Found one solution
<item name="android:windowBackground">@drawable/splash</item>
to
<item name="android:background">@drawable/splash</item>
Add this to the xml file of your splash screen activity.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/splash"/>
</FrameLayout>
Your @drawable/splash
should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/black"/>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/your_image" />
</item>