Reputation: 71
I create raw folder in my project and give reference of images from this folder in project. So in case of different density will android make it's changes according to screen size. or i have to put all images in drawable folder. if yes then please let me know it's resolution and density ratio.
Upvotes: 0
Views: 619
Reputation: 2217
I think this might be helpful.
Density *mdpi Resolution Device iOS Equivalent
ldpi 0.75 320 x 240 Galaxy Y 0.75x
mdpi 1 480 x 320 Galaxy Ace 1x
hdpi 1.5 480 x 854 Android One 1.5x
xhdpi 2 768 x 1280 Nexus 4 2x
xxhdpi 3 1080 x 1920 Nexus 5, Samsung Galaxy S5 3x
xxxhdpi 4 1440 x 2560 Samsung Galaxy S6, S7 4x
Upvotes: 0
Reputation: 3610
Put images in different drawable folder itself rather than to give reference through raw folder. You can create drawable-mdpi, drawable-hdpi, drawable-ldpi These folders are for different resolutions and android select out of these folders according to screen size/resolution of device.
Upvotes: 2
Reputation: 4559
Android already provide three drawable folder to store images for different density, this are darwable-hdpi, darwable-mdpi, darwable-ldpi. you simply need to put images of different density into this folder with the same name. So that when the app run it automatically read images from this folder depending upon the screen resolution.
Upvotes: 2