Kindly I want to know why Galaxy S3 and S4 get the images from this folder (drawable-sw360dp-xhdpi)??
all images seem very large for these devices !
also If I make these images smaller they will not be suitable for larger devices !
Please, what is the solution?
I assume you are using layouts for 10 inch and 7 inch devices are layout-sw720dp and layout-sw600dp then you just create drawable-sw720dp and drawable-sw600dp, also in the case of high density for those xlarge and large screen devices then append the corresponding density to the drawable folder . For example use drawable-sw600dp-hdpi for high density 7 inch tablets like ASUS MeMO Pad HD 7'. Now resource for large and xlarge are solved
Now Consider the drawable-sw360dp devices.
drawable-sw360dp/layout-sw360dp are for phablet devices like Note1,Note2, Micromax CanvasHD,S3.
The above mentioned devices are XHDPI devices. For using drawables either you can use drawable-xhdpi or use drawable-sw360dp-xhdpi
Thus you can distinguish resources for s3,s4 from xlarge and large screen devices.
Note : S3 and s4 taking images from drawable-sw360dp-xhdpi because smallest width of those devices are 320dp. You can check the device display information by installing screen info app from the playstore.
check screen info app here
res/drawable-mdpi/my_icon.png // bitmap for medium density
res/drawable-hdpi/my_icon.png // bitmap for high density
res/drawable-xhdpi/my_icon.png // bitmap for extra high density
http://developer.android.com/guide/practices/screens_support.html
It is based on the dpi
even now there is a xxhdpi folder or I may be wrong on that one??? Some one else to confirm that?
Related
I have a background image of different sizes, 240x320, 320x480, 480x800, 1024x600, 1280x720. I have a drawable-large-mdpi folder that holds 480x800 image, which I use in layout-large and it seems to fit well for screens 5.1", 5.4". From my understanding, layout-large is for screens ranging from 5.1" to 7.3". My question is how to provide a different image of dimension 1024x600 for 7" tablet? Which drawable folder holds this(1024x600) image that i can make use of for 7" tablets?
How could I store 480x800, 1024x600 images in the same folder with same name so that the former can be used on 5.1", 5.4" devices and the later for 7" tablets?
In Eclipse, AVD manager Device Definitions, 5.1", 5.4", 7" devices are specified as Large mdpi. Can i place 1024x600 image in drawable-large-mdpi folder that might scale down for 5.1" and 5.4" devices?
Please help me out. I'm pretty much confused about it.
for 7 inch tablerts you can use
drawable-large-mdpi
drawable-large-hdpi(for Nexus 7)
FHD(Full HD) is 1920*1080.
Which the res folder would be used in FHD and what's the dpi value should be set?
The Smallest width is configured by manufacturer, so it may be varied. For instance, Nexus 7 and Kindle Fire HD both have 1280x800 screen resolution, but the smallest width of N7 is 600dp, while Kindle Fire HD is 533dp.
Here is a way to calculate this:
If 480x800 is mdpi(160) for 5 inch device, the screen dpi(screenDPI) of the device with resolution 1080X1920 is 160*(1080/480)=360 (NOTE: manufacturer might change this number). Then the smallestWidth = 1080/(screenDPI/160).
Use Configuration to find out all the information of the device.
It depends on the screen size because a 7' screen with FHD will not have the same dpi as a 17' screen with FHD. to know DPI I use this calculator :
http://members.ping.de/~sven/dpi.html
and for the folders please try the actual google documentation it is pretty complete:
http://developer.android.com/guide/practices/screens_support.html
hope it helps!
Should we use XHDPI images for retina display in Android? If not, where should I place images/assets for the Samsung Galaxy S3.
Update:
I found a useful artical:
List of Android Devices with pixel density buckets
The Samsung Galaxy S3 got a density of around 309 pixels per inch. From the Android documentation on supporting multiple screen densities:
xhdpi: Resources for extra high-density (xhdpi) screens (~320dpi)
I think we can conclude that assets for the S3 should be placed in the xhdpi folder.
I have both hdpi and xhdpi folders in my res folder. However, android makes use of hdpi xml file for 1280 X 800 resolution of a tablet. Could it be because my xml file accesses resources which are in drawable-hdpi folder but not in drawable-xhdpi folder?
I think you are confused with DPI vs screen sizes, which resolution along does not provide. You can have a XHDPI device with a small screen that is very high resolution (such as the Galaxy S3) or a MDPI or LDPI device with a very large screen (such as when you use Android on your TV).
Generally speaking, Dot per pixel = Resolution / Screen size.
Not all android devices are set to the right density by the manufacturer, its really a hodgepodge of densities no matter what resolution you think you have, the device could still be seen by the android OS as a lower or different density than you think
if the android OS thinks your device is HDPI then it will access HDPI drawables
I want the emulator to make use of the files present in the xhdpi folder and at the same time it should have low density. My emulator is set to a resolution of 1280 X 800 similar to motorola xoom tablet. Now if i keep a density of 149 ppi, android does not access the xhdpi folder. Please help. TIA.
Do not misunderstand Screen size, Screen density and Resolution. Read this article first.