What is the best screen resolution for an Android AVD? - android

This is might seem to be a sort of silly question to ask but I would like to know while testing our apps what is the best resolution to be used (HVGA/WVGA/QVGA?etc)?
I ask this because I want the layout and the performance of the device to be consistent across most screen sizes.

There is a regularly updated diagram with the screen sizes and densitys available at the android developers site:
Source
This doesn't tell you an exact resolution, but seperates all phones into 4 sizes (small, normal, large, xlarge) and densities. This should give you a hint at least.
The biggest chunk is obviously Normal/hdpi, I guess that should be a lot of 3.7" HDPI displays with a 480x800 resolution (or at least close to this res). Like the Nexus One or HTC Desire (there are sure some newer ones, but I only keep an eye on the market when I'm searching for a phone to buy).

You can use all resolution to test your application, because some phones have QVGA resolution, some HVGA or WVGA resolution. Tablets have others resolutions.
More informations : http://developer.android.com/guide/practices/screens_support.html

If you use the dp unit for the sizes of your screen elements, then you shouldn't need to worry (as much) as this is a relative size, based on the pixel density of the screen.

Related

how can i develop application for all android devices ? what setting can i put on simulator that work on most devices?

What simulator resolution i should keep when developing application for Samsung galaxy s2 and galaxy s3 ?
What i found that samsung galaxy s2 has 480x800 resolution and s3 has 1280x720 resolution so what i have understood up till now that 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, I will use image of size 1280x720 and put 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 ??
You will need to create several emulators or get various devices.
There are some pretty important ones, so generally you need to make sure you have:
ldpi, mdpi, hdpi, xhdpi
and
small, medium, large, xlarge
Some people choose to exclude certain sizes (like small and ldpi) but htat's up to you,
if you go with some or all of the following, it should be a good start:
480x320 (SE Mini 10), 480x800 (GS2, Desire, etc), 1280x720 (GS3, Galaxy Nexus etc), 1280x800 (Note, Xoom, various other tablets)
HTC ChaCha (because it's landscape default)
You need to make sure you create resources in the relevant folders for each density, usually, I tend to ignore ldpi and just put resources in:
mdpi,hdpi and xhdpi (mdpi will be scaled down for ldpi devices,
automatically)
You may also need to create various portrait and landscape layouts in different sizes.
Reading this page provides most of the necessary information:
http://developer.android.com/guide/practices/screens_support.html
This page also contains important information regarding size distribution and popularity that is constantly up to date:
Android Stats
One thing that Android does for you is that it manages resolution. If you use the proper size formats (dp, sp, etc), your layout will scale to almost all resolutions. If you place images in the proper drawable folders (hdpi, ldpi, mdpi, etc), the OS will also swap those out as necessary.
Also, the emulator should handle resolutions for specific devices, if I recall correctly.
Desing lazout in smart way! Usualy it means don't put to mutch content in one layout.
Make sure that evrything looks good on smallest size and bigest size. It is better to treat tablets separetly. Read how providing alternative resources works, you can build sepereate layouts for each screen size.
Check if the hardware is available on that device before using it. hasSystemFeature() can be used for checking.

Using appropriate layout markup according to screen resolution

I've got a design list for 480x800, 1024x600, 1280x800. How do I ask android to use exact markup based on user screen's resolution ?
As far as I know there're only abstract means(hdpi,xdpi) for solving resolution difference.
How do I ask android to use exact markup based on user screen's resolution ?
Talented developers don't do that. Talented developers realize that only a percentage of Android devices run at the resolutions listed above, just as desktop Web browsers do not run at only three window sizes. Talented developers work with the graphics designer to come up with fluid layouts for different screen sizes (e.g., -normal, -large, -xlarge), which may or may not run at the aforementioned resolutions. For example, there are devices with screen sizes ranging from 4" to 7" that run at 800x480, and there are devices with screen sizes from 4.5" to 10.1" running at 1280x800 (or thereabouts).
As far as I know there're only abstract means(hdpi,xdpi) for solving resolution difference.
-hdpi and -xhdpi have nothing to do with screen resolution. They are for screen density. Density is independent of resolution, and density is largely independent of size.
Create folder based screen width or height. For example
res/layout-w480dp, res/layout-w1024dp, res/layout-w1280dp
Or
res/layout-h800dp, res/layout-h600dp
Read more here, Table 2. Configuration qualifier names.
Afaik, you can markup the layout folder by that is the minimum required screen resolution for the layout you can set one to min600 and one to min 800.
I think this markup scheme is supported in honeycomb and above and since these are tablets resolutions, they will have either anyway.
see this and this

Which screen resolution when designing an app?

When I design Android apps, I use HVGA resolution in the emulator. I saw (on YouTube and other videocasts) that some developer use higher resolution like WVGA or similar.
Which resolution is best for designing nowadays Android apps? Why?
Why restrict yourself to one resolution? You are perfectly able to customize the design for all screen resolutions. See this page in the developer docs: Supporting Multiple Screens
It tells you how to support multiple screen sizes and how to test them.
The best resolution to design for is the resolution that the user is using. That sounds obvious, but as there are a plethora of Android devices, there are also a plethora of supported screen resolutions. What you need to do is make sure you design your app to support a multitude of resolutions so that it looks great on all devices, not just one. #Tchami points out how to get started.
All of them, simultaneously, because there's nothing more annoying than getting 95% of the way through an app and discovering your boss is testing it on an HTC Desire, her boss is testing it on a Galaxy Tab, and they both want it to look right for them.
For your design time, Tackle multiple resolutions first, landscape/portrait second. Build a ton of emulators with a ton of different screen sizes, including tablets. Those are my priorities. You can always make someone use something that works in the orientation they dont want, but you cant make them use something that doesnt work in either orientation.
The other comments here are all correct that it should work at all resolutions. If you want to know which ones you should focus on and make pixel perfect, use the Android Device Dashboard, which provides a breakdown of all the screen sizes and densities of the last week worth of Market users. This will let you know which screen types are especially worth targeting (normal hdpi and normal mdpi dominate at the moment)
http://developer.android.com/resources/dashboard/screens.html
I always design 768px X 1280px canvas size, this is about xHdpi resolution and you should resize all elements in canvas to 4 sizes or 5 which are mdpi,hdpi,xhdpi(baseline),xxhdpi,xxxhdpi(optional) then you have a device independent design for your app.
mdpi = 160dp = %50 (resize)
hdpi = 240 dp = %75 (resize)
xhdpi = 320 dp = %100 (baseline)
xxhdpi = 480 dp = %150 (resize)
xxxhdpi = 640 dp = %200 (resize)

Which layout will use a 10,1" 1024x600 tablet?

I want to make sure that devices with 10,1" and 1024x600 under 2.1/2.2(e.g. Archos 101) are using the correct layout.
Are they large and ldpi?
Also, how can I simulate them using the android emulator?
In the end, the choices of screen size and screen density are up to the manufacturer. Hence, nobody here can answer you definitively.
A 10.1" diagonal screen should be large and probably should be ldpi, though it is possible it will be declared mdpi based upon the apparent density given the distance one would typically hold a 10.1" tablet from one's face.
Bear in mind that ARCHOS' devices do not ship with the Android Market AFAIK, and hence do not necessarily pass the various compatibility tests. As a result, ARCHOS could do all sorts of stuff that would be unexpected.
Also, how can I simulate them using the android emulator?
The Android SDK is not well-suited for testing a 10.1" LCD at this time. I would expect better instructions and support for such sizes in Android 3.0.
For now, set the resolution and density for the AVD when you create it. In this case, you would want to specify 120dpi (ldpi) for the density. Android should put it in the large screen size bucket for you, given those values. Leastways, that basic approach works for getting large WVGA devices.

How big is an android phone's screen?

How big is the smallest motorola android's screen, in pixels? I want to know what size I need to make my graphic without it being too distorted by the fill_parent.
Although this doesn't directly answer your question..
Android is the name of the operating system running on Android phones. Different phone models could have different resolutions and pixel densities. Therefore you have to be careful not to hardcode resolution values into your code. It might run well on one phone but poorly on another.
Check out these pages for details about supporting different screens:
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/resources/dashboard/screens.html
It would be unwise to program for one screen size, especially if you plan on distributing your application later. You should design your application for as many screen sizes as possible.
Instead use nine-patch images and flexible layouts.
If you are designing an icon, the look at the android icon design guidelines and consider high, medium and low density screens. There are different resource folders for these too and android takes care of selecting the appropriate one for the current device.
motorola droid's display size is 480x854 px, according to specs, so it's rather non-standard

Categories

Resources