Android Code Snippet Splashscreen Manifest AppCompat

Hi everyone,
I had to fix the ugly white page that shows for a bit before the app starts (using B4XPages).

There is this tutorial by Erel in the forum:
that explains how to do everything, with a beautiful video by ADeveloper at the end of post.

However Erel's project does not use AppCompat as theme, so this is my manifest to solve the white page still using AppCompat as a theme (ignore the color things, you can remove or change them)

SetActivityAttribute(Main, android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
    <style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#213e45</item>
        <item name="colorPrimaryDark">#213e45</item>
        <item name="colorAccent">#a4c13c</item>
         <item name="android:windowBackground">@color/window</item>
CreateResource(values, colors.xml,
    <color name="window">#FF213E45</color>