Android values folder to different display sizes - android

Have declared next values folders.
values
values-sw320dp (... to 4'')
values-sw480dp (5'' to 5,5'')
values-sw600dp (7'' to 10'')
values-sw720dp (10'' to ...)
In each folder have one dimens.xml file with different margins, paddings, etc...
But don´t know what specific values folder need to work with display between 4'' and 5'', specifically 4,65'' and 4,7''.

Check the correct device resolution and follow the charts offered by Android:
http://developer.android.com/guide/practices/screens_support.html
Configuration examples:
To help you target some of your designs for different types of devices, here are some numbers for typical screen widths:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800
hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
in your case you will have your 4,65'' device in "values-480dp" folder.

Related

List of Android aspect ratios?

I'm developing a game for mobile devices and have come to the point where I need to adapt it to different aspect ratios.
I've looked around for the common Android aspect ratios but most resources only list the DPI value.
Anyone know any resources I may have missed, or might happen to know the common aspect ratios off the top of their head?
Typically I'm not a fan of providing links as answers, but there is a community wiki here on SO that is maintaining a list of Android aspect ratios. It contains 30+ devices so far.
Found here: Is there a list of screen resolutions for all Android based phones and tablets?
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc). = 3:4
480dp: a tweener tablet like the Streak (480x800 mdpi). = 3:5
600dp: a 7” tablet (600x1024 mdpi ~= 640x1024). 10:16
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc). 9:16
from: http://developer.android.com/guide/practices/screens_support.html
also: http://en.wikipedia.org/wiki/Comparison_of_Android_devices

7 inch tablet with resolution 480X800 layout issue

I have
layout
layout-large
layout-xlarge
folders in my res folder.
But despite being a 7 inch tablet the layouts are picked from layout folder instead of layout-large.
and device runs on android 4.0
Am i missing something??
Thanks.
Check Configuration examples in Supporting Multiple screens document.
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
Check the correct device resolution and follow the charts offered by Android:
http://developer.android.com/guide/practices/screens_support.html
Configuration examples:
To help you target some of your designs for different types of devices, here are some numbers for typical screen widths:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800
hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
in your case you need to create a "layout-600dp" folder inside your "res" folder.
Because the DP of the device is 160dp/inch which falls under the category of mdpi devices

layout folder name for devices 720x1280 like samsung galaxy s3

I made an app earlier which was all good, at the time of development there were only two devices in the market galaxy note and samsung nexus, now devices with resolution 720*1280 are around 30, when my app runs on these devices they go to left corner leaving the empty space behind, layout folder name were created were layout-small, layout-large, layout-normal,
As far I know xlarge is for tablets, my question is what will be the layout folder name for devices having 720*1280 resolution, and what dpi in width they have, like in normal screen the width is 320dp , what will be in hd devices.
Edit : another thing sw360dp works fine on ICS, jelly beans does not pick resources from it. :/
Try using folder name with /layout-sw360dp/  and width 360dp
For devices having 720 * 1280 resolution, you can use layout-sw720dp folder
More info is provided in the official documentation (see Configuration Examples)
To help you target some of your designs for different types of
devices, here are some numbers for typical screen widths:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
For other cases in which you want to further customize your UI to
differentiate between sizes such as 7” and 10” tablets, you can define
additional smallest width layouts:
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)

What simulator resolution should I use when developing app for Samsung galaxy s2 and galaxy s3?

From what I found, Samsung galaxy s2 has 480x800 resolution and s3 has 1280x720 resolution. So I believe I should ask my graphics designer to provide me hdpi graphics that contain 480x800 background images and to implement same background image in galaxy s3 mobile. Can I use image of size 1280x720 and put it in xhdpi folder so that it can work on s3.
The background image is something which covers whole available area for mobile app. so am I right in this approach ??
Why don't design in both resolutions?
See http://developer.android.com/guide/practices/screens_support.html for more detailed.
You should read Supporting multiple screens. You must define dpi on your emulator. 240 is hdpi, 160 is mdpi and below that are usually ldpi.
Extract from Android Developer Guide link above:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).

Android SDK emulator (AVD) for tablet size

Hi guys i was wondering how to create an emulator environment for a tablet sized device, i know there are quite a few devices being released soon, but how do start sizing up my layout?
thanks
The Samsung Galaxy Tab has a 1024×600 resolution. You can easily Google resolutions for other devices that have been announced and create AVDs with matching specs.
You might also want to read up on Supporting Multiple Screens.
Configuration examples:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).

Categories

Resources