views:

465

answers:

2

I'm new to Android programming. I've seen different phones with different screen resolutions that run on Android. How can I create an application that works on all android devices with out any distortion in my application views.....

+1  A: 

The short answer is to size all your layout items in dip. dip is short for Density-independent pixel and Android automatically scales items sized in dip to be the same size on different screens. (You can shorten dip to dp in your layout XML files.)

The long answer is to read this article on the Android developer website. It is long but I highly recommended reading it from beginning to end at least once before you get too far with you application.

Dave Webb
A: 

There are some best practices to have resolution independent app,

  1. To use all 9 patch images.
  2. To create layout according to Density Independent Pixel.
Rajnikant