Question

Possible Duplicate:
Android Layout and positioning issue

Design layout which support for all kind for resolution....

Was it helpful?

Solution

Its better not to hard code the design for a particular resolution. Its better to use attributes like layout_weight attributes, layout_width and layout_height values of wrap_content and match_parent to get different proportional widths depending on the screen size, rather than hard coding pixel values.

Another option is to create and define different sets of layouts and drawables for different resolutions. Use the layout-large , layout-small etc. and drawable-large , drawable-small etc. Android will automatically chose the necessary resources according to the device that is being used.

OTHER TIPS

try these three steps

1.Use Layout weight concept

2.Don't use hard coded values in your xml files

3.have to take care of layout_height,layout_width when you are using weights based on orientation(vertical/horizontal)

  • vertical: layout_height=0px

  • horizontal: layout_width=0px

if you follow these steps its supports for almost all resolution design will be efficient

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top