1

I am developing an android application for resolution 320x240. i want to use this same application for higher resolution is it possible or i have to design UI for every resolution

user728702
  • 99
  • 1
  • 1
  • 5

4 Answers4

2

Scale your application to be supported in different screen resolutions by following the guidelines at this link.

http://developer.android.com/guide/practices/screens_support.html#screen-independence

Mainly you have to use density index pixels(dp) as the unit to define size wherever you need rather than hardcoding with px

bHaRaTh
  • 3,464
  • 4
  • 34
  • 32
  • i am using "dp" as the unit but i m having problem with the listview and other controls. i am not able to set their height – user728702 Apr 28 '11 at 08:56
  • for large screen, it uses specified height bcoz of that it look worst, but in Normal screen it look good – user728702 Apr 28 '11 at 08:59
0

Make your design 'fluid' by avoiding e.g. AbsoluteLayout (see the documentation for details). Graphics should be provided for each resolution in the drawable-Xdpi folders.

hanspeide
  • 2,819
  • 4
  • 25
  • 33
  • @hpe.. ya i am having same problem but without relative layout.. how can we create page design as we want.. its bit difficult in other layout .. – Ajay Patel Apr 28 '11 at 08:11
  • Read the documentation, it's all there: http://developer.android.com/guide/practices/screens_support.html – hanspeide Apr 28 '11 at 09:35
0

Android was designed to fit different resolution automatically. I would advice to read article from google about it.

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103
0

You need not to use different layout for different resolution. What you need is just use three different resolution images of same name for all images and keep them in separate drawable folders(named drawable-hdpi,drawable-mdpi,drawable-ldpi) and also use screen width according to screen resolution whenever needed.For example :

int width=getWindowManager().getDefaultDisplay().getWidth() ;

gives you complete screen width.

For more details see Supporting Multiple Screens

Hope this will help you.

Dinesh Sharma
  • 11,533
  • 7
  • 42
  • 60