I have an older application made with ionic 5 / capacitor 3. I have successfully upgraded to API 33, now using capacitor 4. So far so good, however the splash screen is completely broken.
I finally solved this problem successfully based on this topic:
However, tested on older Android, specifically Android 11, it is not good, it stretches completely.
How can I fix it to make the splash screen work properly on Android 12 and above?
This my styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#17ba5b</item>
<item name="colorPrimaryDark">#44e283</item>
<item name="colorAccent">#d9d9d9</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
</style>
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/icon</item>
<item name="android:windowSplashScreenBackground">#17ba5b</item>
<item name="windowSplashScreenBackground">#17ba5b</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/icon</item>
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
</style>
</resources>
Thanks!