I am working on an application where the Splash Screen shows only an image. I have created a theme for my Splash Activity and the theme has a image as the background.
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">@drawable/splash_screen</item>
</style>
Now sometimes I get OutOfMemoryException
for some of the users in the Splash Screen. I am not able to reproduce the issue as it happens for specific devices only and I get to know about it through crashlytics logs only. I have been using different folders for different densities.
There are tons of questions on SO regarding this and all of them suggest not to use the image directly from the resources but instead scale down the image first and then load it in memory. Providing links to one of the questions
Should we never set src to an ImageView or image background to an activity directly in XML? Because in that case we won't be able to scale down the image?