Are XHDPI images meant for use with retina displays in Android? - android

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.

Related

Screen density for xx-hdpi screens [duplicate]

The Google Nexus 10 comes out shortly, and is the first device to use xxhdpi resources. It sports a display density of about 300 DPI (according to the Nexus 10 website and this calculator).
However, when I go to the Android documentation, it states:
ldpi : ~120dpi
mdpi : ~160dpi
hdpi : ~240dpi
xhdpi : ~320dpi
xxhdpi is not specified.
How come the Nexus 10's 300 DPI screen is xxhdpi instead of xhdpi, and what should be the approximate DPI of xxhdpi? Should we even worry about having new resources (aside from icons) for xxhdpi at this point, or should we just let the OS scale up xhdpi resources?
According to the post linked in the G+ resource:
The gorgeous screen on the Nexus 10 falls into the XHDPI density
bucket. On tablets, Launcher uses icons from one density bucket up
[0] to render them slightly larger. To ensure that your launcher icon
(arguably your apps most important asset) is crisp you need to add a
144*144px icon in the drawable-xxhdpi or drawable-480dpi folder.
So it looks like the xxhdpi is set for 480dpi. According to that, tablets use the assets from one dpi bucket higher than the one they're in for the launcher. The Nexus 10 being in bucket xhdpi will pull the launcher icon from the xxhdpi.
Source
Also, was not aware that tablets take resources from the asset bucket above their level. Noted.
xxhdpi was not specified before but now new devices S4, HTC one are surely comes inside xxhdpi .These device dpi are around 440. I do not know exact limit for xxhdpi See how to develop android application for xxhdpi device Samsung S4
I know this is late answer but as thing had change since the question asked
Note Google Nexus 10 need to add a 144*144px icon in the drawable-xxhdpi or drawable-480dpi folder.
The DPI of the screen of the Nexus 10 is ±300, which is in the unofficial xhdpi range of 280‑400.
Usually, devices use resources designed for their density. But there are exceptions, and exceptions might be added in the future.
The Nexus 10 uses xxhdpi resources when it comes to launcher icons.
The standard quantised DPI for xxhdpi is 480 (which means screens with a DPI somewhere in the range of 400‑560 are probably xxhdpi).
480 dpi is the standard QUANTIZED resolution for xxhdpi, it can vary something less (i.e.: 440 dpi) or more (i.e.: 520 dpi). Scale factor: 3x (3 * mdpi).
Now there's a higher resolution, xxxhdpi (640 dpi). Scale factor 4x (4 * mdpi).
Here's the source reference.
The resolution is 480 dpi, the launcher icon is 144*144px all is scaled 3x respect to mdpi (so called "base", "baseline" or "normal") sizes.
The newer android phones in the market like HTC one, Xperia Z etc have resolutions in the >480dpi range, putting them in the new xxhdpi class as well. The new assets might be useful for them too.
A set of four generalized sizes: small, normal, large, and xlarge
Note: Beginning with Android 3.2 (API level 13), these size groups are deprecated in favor of a new technique for managing screen sizes based on the available screen width. If you're developing for Android 3.2 and greater, see Declaring Tablet Layouts for Android 3.2 for more information.
A set of six generalized densities:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
From developer.android.com : http://developer.android.com/guide/practices/screens_support.html
As per this PPI calculation tool, Google Nexus 10 has a display density of about 300 DPI...
However, Android documentation states that:
ldpi : ~120dpi
mdpi : ~160dpi
hdpi : ~240dpi
xhdpi : ~320dpi
xxhdpi is not specified.
I think we just let Android OS scale up xhdpi resources...

Galaxy S3 and Galaxy S4 with layout-sw360dp

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?

Android xhdpi density and resolution

I'm a bit confused and i hope you can help me. I'm developing an application for smartphones and i'm using prefixes like: mdpi, hdpi and xhpi. With first two i don't have any problems.
According to this:
http://developer.android.com/guide/practices/screens_support.html
and this
http://developer.android.com/about/dashboards/index.html
xhdpi is 640x960 px screen size and I have prepared my graphics for this resolution. But I can't find any device with this resolution. Instead of this, in android layout editor I have, for example, Galaxy Nexus which is marked as xhdpi device, but it has 720p screen size.
So my question is, I should look at this tables from documentation and believe that 25% devices has screen of size 640x960 px or I should change my graphics to the 720p screen size ?
If you develop only for phones and tablets for you is unnecessary you may not use xhdpi folder for your resources. If you want that your app works fine on modern devices such as Galaxy Nexus, Nuxus 4, etc you should support xhdpi screens.
large screens are at least 640dp x 480dp (hdpi)
xlarge screens are at least 960dp x 720dp (xhdpi)

Android XXHDPI resources

The Google Nexus 10 comes out shortly, and is the first device to use xxhdpi resources. It sports a display density of about 300 DPI (according to the Nexus 10 website and this calculator).
However, when I go to the Android documentation, it states:
ldpi : ~120dpi
mdpi : ~160dpi
hdpi : ~240dpi
xhdpi : ~320dpi
xxhdpi is not specified.
How come the Nexus 10's 300 DPI screen is xxhdpi instead of xhdpi, and what should be the approximate DPI of xxhdpi? Should we even worry about having new resources (aside from icons) for xxhdpi at this point, or should we just let the OS scale up xhdpi resources?
According to the post linked in the G+ resource:
The gorgeous screen on the Nexus 10 falls into the XHDPI density
bucket. On tablets, Launcher uses icons from one density bucket up
[0] to render them slightly larger. To ensure that your launcher icon
(arguably your apps most important asset) is crisp you need to add a
144*144px icon in the drawable-xxhdpi or drawable-480dpi folder.
So it looks like the xxhdpi is set for 480dpi. According to that, tablets use the assets from one dpi bucket higher than the one they're in for the launcher. The Nexus 10 being in bucket xhdpi will pull the launcher icon from the xxhdpi.
Source
Also, was not aware that tablets take resources from the asset bucket above their level. Noted.
xxhdpi was not specified before but now new devices S4, HTC one are surely comes inside xxhdpi .These device dpi are around 440. I do not know exact limit for xxhdpi See how to develop android application for xxhdpi device Samsung S4
I know this is late answer but as thing had change since the question asked
Note Google Nexus 10 need to add a 144*144px icon in the drawable-xxhdpi or drawable-480dpi folder.
The DPI of the screen of the Nexus 10 is ±300, which is in the unofficial xhdpi range of 280‑400.
Usually, devices use resources designed for their density. But there are exceptions, and exceptions might be added in the future.
The Nexus 10 uses xxhdpi resources when it comes to launcher icons.
The standard quantised DPI for xxhdpi is 480 (which means screens with a DPI somewhere in the range of 400‑560 are probably xxhdpi).
480 dpi is the standard QUANTIZED resolution for xxhdpi, it can vary something less (i.e.: 440 dpi) or more (i.e.: 520 dpi). Scale factor: 3x (3 * mdpi).
Now there's a higher resolution, xxxhdpi (640 dpi). Scale factor 4x (4 * mdpi).
Here's the source reference.
The resolution is 480 dpi, the launcher icon is 144*144px all is scaled 3x respect to mdpi (so called "base", "baseline" or "normal") sizes.
The newer android phones in the market like HTC one, Xperia Z etc have resolutions in the >480dpi range, putting them in the new xxhdpi class as well. The new assets might be useful for them too.
A set of four generalized sizes: small, normal, large, and xlarge
Note: Beginning with Android 3.2 (API level 13), these size groups are deprecated in favor of a new technique for managing screen sizes based on the available screen width. If you're developing for Android 3.2 and greater, see Declaring Tablet Layouts for Android 3.2 for more information.
A set of six generalized densities:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
From developer.android.com : http://developer.android.com/guide/practices/screens_support.html
As per this PPI calculation tool, Google Nexus 10 has a display density of about 300 DPI...
However, Android documentation states that:
ldpi : ~120dpi
mdpi : ~160dpi
hdpi : ~240dpi
xhdpi : ~320dpi
xxhdpi is not specified.
I think we just let Android OS scale up xhdpi resources...

Android does not access xhdpi folder for tablet view

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

Categories

Resources