I've been searching online for the right way to avoid the white screen - replacing it with a splashscreen - when my Android app launches. I found solutions that uses styles like
<style name="AppTheme.SplashTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>
But in my case this only delays the view appearance, acting as the app doesn't work (the view inflates after a couple of seconds). I do not want some view that lasts for some seconds I've decided, I just want to replace the blank screen to something custom while my app needs to load. The only way to have the desired behaviour was to place a drawable as a background in the style of my SplashscreenActivity.
<item name="android:windowBackground">@drawable/background_splash</item>
Now, I would like not to place an image as a background-because of the different resolutions of screens- but to set an xml layout. Is this possible? What's the best way to get rid of the blank screen without delaying the view appearance?