title: Is it possible to get an uncropped splash screen in Android 12?
body: <p>On Android versions older than Android 12 I am easily able to construct a splash screen with an image which is not cropped. For example like this on Android 11:</p>
  <p><a href="https://i.stack.imgur.com/s8Jbn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s8Jbn.jpg" alt="Splash screen on Android 11" /></a></p>
  <p>However, Android 12 introduced a new Splash Screen API and I can't figure out how to reproduce the splash screen above in Android 12. It seems that it is always cropped and turns out like this on Android 12:</p>
  <p><a href="https://i.stack.imgur.com/vggr5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vggr5.jpg" alt="Splash screen on Android 12" /></a></p>
  <p>This is my <code>android/src/main/res/values/styles.xml</code> for older Android versions (e.g. Android 11):</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;resources&gt;
      &lt;style name=&quot;LaunchTheme&quot; parent=&quot;@android:style/Theme.Light.NoTitleBar&quot;&gt;
          &lt;item name=&quot;android:windowBackground&quot;&gt;@drawable/launch_background&lt;/item&gt;
          &lt;item name=&quot;android:windowFullscreen&quot;&gt;false&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name=&quot;NormalTheme&quot; parent=&quot;@android:style/Theme.Light.NoTitleBar&quot;&gt;
          &lt;item name=&quot;android:windowBackground&quot;&gt;?android:colorBackground&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>This is my <code>android/src/main/res/values-v31/styles.xml</code> for Android 12:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;resources&gt;
      &lt;style name=&quot;LaunchTheme&quot; parent=&quot;@android:style/Theme.Light.NoTitleBar&quot;&gt;
          &lt;item name=&quot;android:windowSplashScreenAnimatedIcon&quot;&gt;@drawable/launch_background&lt;/item&gt;
          &lt;item name=&quot;android:windowFullscreen&quot;&gt;false&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name=&quot;NormalTheme&quot; parent=&quot;@android:style/Theme.Light.NoTitleBar&quot;&gt;
          &lt;item name=&quot;android:windowBackground&quot;&gt;?android:colorBackground&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>The only difference between the two <code>styles.xml</code> is that I use <code>android:windowSplashScreenAnimatedIcon</code> for Android 12 and <code>android:windowBackground</code> for older Android versions as stated in the documentation for the new splash screen API (<a href="https://developer.android.com/guide/topics/ui/splash-screen" rel="nofollow noreferrer">https://developer.android.com/guide/topics/ui/splash-screen</a>).</p>
  <p>Both <code>styles.xml</code> use <code>@drawable/launch_background</code> which is defined in <code>android/src/main/res/drawable/launch_background.xml</code> as follows:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;item&gt;
          &lt;bitmap android:gravity=&quot;fill&quot; android:src=&quot;@drawable/background&quot;/&gt;
      &lt;/item&gt;
      &lt;item&gt;
          &lt;bitmap android:gravity=&quot;center&quot; android:src=&quot;@drawable/splash&quot;/&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  <p><code>@drawable/background</code> is just a <code>.png</code> with a single white pixel (1x1) and <code>splash.png</code> (1280x721) is the actual image I want to show in the splash screen which should not be cropped. I uploaded both files here: <a href="https://imgur.com/a/IzyYAwP" rel="nofollow noreferrer">https://imgur.com/a/IzyYAwP</a></p>
  <p>With the new Android 12 Splash Screen API, is it even possible to get a splash screen which is identical to the result I got with Android 11 (no cropping of the background image)? If yes, how is that possible?</p>