Search code examples
androidandroid-layoutandroid-screen-supportandroid-resolution

How to Design a Layout which Support for most resolutions?


Possible Duplicate:
Android Layout and positioning issue

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


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.