I am a bit new to android and developing an app which has 10 full screen background imageviews . after a while working with the app it force closes because of outOfMemory exception. I got every image in the 720 × 1200 px from photoshop designer. I haven’t put different sizes of images in drawable-dpi folders since I am confused how to scale. where am I supposed to put this 720 × 1200 ? in which drawable folder ? Any help or clear explanation would be appreciated . Tnx in advance .
2
Answers
I dont think the solution you are looking for is to use the different drawable resource folders for different screen densities but instead you should check this link: https://developer.android.com/topic/performance/graphics/load-bitmap.html on how to load the bitmaps more efficiently by downsampling before you load them into the Image View and by making sure you release any bitmap that isn’t being used any longer.
You have to create different dimen , layout , images and icon files to support all devices.
changes in screen density.
Make this layout files, so that it will be same for all devices.
Give padding ,margin ,font and all properties as per devices.
For Layout ,
For Images
For Icon
For Launcher icon
Checkout Dimension and
Supporting Multiple Screens Official Documentaion.