Android same category but different size devices? - android

I'm developing an android app. I've done much so far, but I've some problems. So far, I've compiled the app on Nexus 5 and I've designed the layout for that device. I know that, I should have different layout folders for different screen categories, but my problem is that, for example, my app works pretty good on Nexus 5, but not good on Nexus S.
And I also know that those 2 devices are in the same layout category.
How can I solve this issue? I want a layout for Nexus S which differs Nexus 5.
Note: Please, do not comment documentation links. I've read them all, but couldn't solve my problem.
Thanks!

From official documentation:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
Using desnity:
Nexus 5 is ~445 dpi => belong to xhdpi category.
Nexus S is ~233 dpi => belong to mdpi category.
So you can use layout-xhdpi directory for Nexus 5, and layout-mdpi directory for Nexus S.
UPDATE
Using dimensions:
Nexus 5 is 1080 x 1920 pixels. => layout-1080x1920 directory
Nexus S is 480 x 800 pixels. => layout-480x800 directory (or just the default one)

Related

setting up dimens Nexus 5

my project currently just has one dimens file.. I know all my dimens look good on a nexus 5 which i believe has a dpi of 445 and a dpx of 3. My question is does that make it mdpi, hdpi, xhdpi? I am asking as i want to use this as the standard when i go ahead and make my other dimens files.
according to this graph: http://i.stack.imgur.com/1NXYH.png
that would make it xxhdpi which seems wrong to me, especially since our dimens seem really small on a tab 4 which has a much bigger screen than the nexus 5.
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
Since Nexus 5 has pixel density of 445 therefore it is xxhdpi
Read this android developer link
Also have a look at this question

Android Screen Densities: how many densities?

I am developing an Android app that downloads images from an S3 bucket and displays them full screen on the phone.
How many different densities should I create in the S3 bucket for each image, in order to include both phones and tablets?
What about for Apple devices (again, both phones and tablets)?
Note: I have read the Android Supporting Multiple Densities help page. I have also found similar questions on Stackoverflow, but they are 3-4 year old and new devices have popped up since then.
Thanks!
You could include one of them or all of them, that depends on how many densities you want your images to look good. The answer to this question depends on how much you care about it. If you don't care and just want it to work, add only one.
For Android you have:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
And for iPhone:
normal
#2x
#3x

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...

Layout folder for New Nexus 7

One of our user complaint that app does not look good on New Nexus 7(1200*1900 with 323PPI resolution). I am not getting which layout folder I have to create to give support this new device.
You should use layout-sw600dp because large might include 5 inch devices like Dell Streak also - From the Android guidelines.
The new Nexus 7 uses xhdpi resources but for app icon, it uses xxhdpi. That's what I've observed in my app on my Nexus 7.
Should fall into xhdpi bucket.
ldpi : ~120dpi
mdpi : ~160dpi
hdpi : ~240dpi
xhdpi : ~320dpi
The new Nexus 7 is of 320dpi. So it falls on the large xhdpi bucket.
So you can specify layout as layout-large-xhdpi.
Nexus 7 picks the resources from tvdpi folder . Please try that like layout-large-tvdpi, drawable-large-tvdpi.
Sorry , I was talking about old Nexus 7 , new Nexus 7 picks up from large-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...

Categories

Resources