Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which screen resolution should i consider while designing an android application?

I have searched for a while, to know which screen resolution i should consider before starting to design an android app.

I found these things:

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

Which device resolutions should be kept in mind when developing Android Apps?

but actually these are not what i wanted.

what i wanted to know is should i design my application for each of these resolution or take the most used resolution alone into consideration

or

if i am not using any hardcoded values for widths, heights and margins etc.., i never need to worry about the screen resolutions

or

how good is this - find the device width and height using Display metrics and create all views according to these values Dynamically ?

like image 375
Archie.bpgc Avatar asked Jul 03 '12 13:07

Archie.bpgc


1 Answers

Should I design my application for each of these resolution or take the most used resolution alone into consideration.

You should make sure your application works correctly on all screens, not just the most popular one. I would begin from the bottom up... first make sure it works correctly on small/normal screens (and in doing so, you make sure it works on all screens). Then you can optimize your layouts for tablets by using multi-pane layouts, etc.

If I am not using any hardcoded values for widths, heights and margins etc., I never need to worry about the screen resolutions.

Not sure what you are trying to say here, but you should always be wary about different screen resolutions by using dp (density independent pixels) instead of px.

Find the device width and height using Display metrics and create all views according to these values dynamically?

This should be a last resort. Most of the time, your layouts won't be that complicated though, and it won't be necessary. A lot of the time you'll use wrap_content and match_parent to set the widths/heights, and often times you'll use RelativeLayouts to space the views relative to one another. You only really need to measure the widths/heights of the views if you find its absolutely necessary.

like image 163
Alex Lockwood Avatar answered Oct 23 '22 02:10

Alex Lockwood