From your experience as an android developer what emulator screen sizes do you use?
Are there a couple that tend to catch most UI sizing issues or do you test your app in every size and density?
While coding, try to cover at least one of each from this table: http://developer.android.com/guide/practices/screens_support.html#testing . After most of the work is done, I would suggest try every combination you'll find in real devices you plan to deploy your app.
My very basic list while I am designing the UI is:
WQVGA 120 dpi
HVGA 160 dpi
WVGA 160 dpi
WVGA 240 dpi
Add 480x640 240 dpi if you want to support small screens.
You can use the pie chart here to have an idea of relative screen size usage: http://developer.android.com/resources/dashboard/screens.html
BTW, I have use AVDs from Donut to Gingerbread also.
At some point, I test on every size and density that I intend the app to run on. It's irresponsible not to do so.
But beware of densities; because of dpi scaling, you may be running what you think is an hdpi emulator, but the emulator is loading mdpi resources (or vice versa). It's a good practice when testing to log the reported density during onCreate of your launch activity. (My approach, though, is to use an app icon for each density that displays the density, at least until I want to test the real app icons. That way I can tell from the home screen what the emulator thinks it is running.)
you should test your app in every size , in order to be sure that your app will work fine in every android phone ;
and for density , try to create your UI with dip :)
hope it helps
Related
i developed an android appplication. and i want to test this application for xlarge screens.
when i tried to create an emulator with the following resolutions the emulators are not loading
is there any way to test the application for xlarge screens
I tried with the following resolutions:
hdpi-
1536x1152
1920x1152
1920x1200
xhdpi-
2048x1536
2560x1536
2560x1600
my monitor is Dell-21" with resolution Max-1600*900.
There are specific Android API calls that can, at runtime tell you what density and (small/large/normal) screen size a handset has. However, as a developer we should not need to worry about individual handsets at all. All we need to do is to have ldpi/mdpi/hdpi assets and small/normal/large layouts in the apk. Android internally handles everything.
Dont forget to get an indepth understanding of how Android determines which assets to use and aliasing like this.
The definitions are:
xlarge screens are at least 960dp x 720dp.
large screens are at least 640dp x 480dp.
normal screens are at least 470dp x 320dp.
small screens are at least 426dp x 320dp. (Android does not currently support screens smaller than this.)
Here are some more examples of how this works with real screens:
A QVGA screen is 320x240 ldpi. Converting to mdpi (a 4/3 scaling factor) gives us 426dp x 320dp; this matches the minimum size above for the small screen bucket.
The Xoom is a typical 10” tablet with a 1280x800 mdpi screen. This places it into the xlarge screen bucket.
The Dell Streak is a 800x480 mdpi screen. This places it into the bottom of the large size bucket.
A typical 7” tablet has a 1024x600 mdpi screen. This also counts as a large screen.
i want to test this application for xlarge screens. when i tried to
create an emulator with the following resolutions the emulators are
not loading is there any way to test the application for xlarge
screens
AFAIK you can Only create Emulator With Given Below suggestions with Density
While Creating AVD you will get Below Image. you can only choose from the Below Devices to make your Emulator.
Your Alternative Solution :
However, I need to ensure everything's fine.
Yes you can Surely get what you want.
if you want to Check whether your application runs perfectly on 960x640(Normal screen xhdpi) Device. you can Make Custom Configuration From Below Suggestion.
After Update your ADT to version 21.
In Older Version each time you have to set Add Custom Screen if you want custom Device Configurations as (if you want Nexus 4).
In ADT21 version you can get this thing done by
open AVD Manager, u can define your custom screen in "Device Definition"
Alternative (Much Easier approach)
in Newest Version you Don't Need to Set Custom Device
Configurations from the above Suggestion as much easier way is available for it. you >Just Have to Make Emulator With your Device
Configurations and after you will see those Configurations with
Emulator Name Inside Graphical Layout of XML
like after Created my Emulator of Nexus7 Emulator with Android 4.2 with Name as "Nexus7_Android_4.2" i will get this Device Configuration in Graphical Layout of xml automatically.
Below is the Screen Shot of it.
Hope it will Help you.
In emulator ie in AVD->Device Definition.You can select and fix any type of resolution. You
can also customise any type of size. Since it takes time to load due to high resolution in
emulator.
I only have one actual device to test on, a Nexus One but I've briefly used a Droid X in the past. I recall a better looking screen but I don't remember it fitting more icons on the home screen than my N1. So I'm wondering if my emulators and such are truthful or not.
I'm running 2 emulators, WVG800, one at 240 the other 160. The 240 looks right. The 160 doesn't, everything is much smaller including buttons, radio buttons, things that I have not specified an exact size for. The Supporting Multiple Screens document shows different densities looking exactly the same in the image below. However, my emulators do not maintain that look. Is something wrong?
They have different display size in real world. WVGA800 with density 240 is likely to be a phone with 4" screen. And WVGA800 with density 160 is probably a tablet with 7" screen. Check the option Scale display to real size when you starting emulator to see the difference.
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.
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)
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.