Quick learner
Quick learner

Reputation: 709

how to i develop android application to work in different screen resolutions

I,m working on android project. Actually i have develop on small app in honeycomb with resolution(1024*600), when am running the same app in different resolution let say android 2.2(froyo) screen the alignment of images in app screen changes.

Note:Images that are place in xml file are manual arranged(no wrapper thing used for width and height)

Please help me out this question asap..

regards,

Murali...G

Upvotes: 1

Views: 2846

Answers (3)

Hazem Farahat
Hazem Farahat

Reputation: 3790

Check this Android class: http://developer.android.com/training/multiscreen/index.html

Upvotes: 0

san
san

Reputation: 1835

Mainly we need to look up is the usage of UI patterns like action bar, Dashboard etc. But the key point is you should use less static images and as you also use tablet. You should've used Fragments(Of course you would ve done. In case if you have done. Please do it).

Also use 9 patch images or colors for backgrounds. If you are using different images then. You need to keep images for different density.

Maybe all I say is abstract as this question is a abstract one. There is no one line answer for this. As this is a process by itself.

Upvotes: 1

Padma Kumar
Padma Kumar

Reputation: 20041

//design your xml in this way

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation



Low density Small screens QVGA 240x320 

res/layout-small-ldpi
res/layout-small-land-ldpi

Low density Normal screens WVGA400 240x400 (x432)

res/layout-ldpi
res/layout-land-ldpi

Medium density Normal screens HVGA 320x480

res/layout-mdpi
res/layout-land-mdpi

Medium density Large screens HVGA 320x480

res/layout-large-mdpi
res/layout-large-land-mdpi

High density Normal screens WVGA800 480x800 (x854)

res/layout-hdpi
res/layout-land-hdpi

Xoom (medium density large but 1280x800 res)

Upvotes: 1

Related Questions