Search code examples
androiduser-interfacepositionresolution

how to set UI for all resolutions in android


hi i am a new developer and i am being a trainee now, i working on UI part of an app. How can i design the UI of my app to be fitted for all resolutions.

I am using droid draw for placing the positions. In that i will be having the screen size to be as HVGA portrait, when i run it in a QVGA device the positions get moved. For this in my coding i used to give as if(width = 480 && height == 854) the positions must be so and so. This gives good effect in those resolutions only, but when i run it in 480x800 or other devices the problem continues. How to overcome these problems. Am i doing the UI part in a right way?? if not please help me... i my place i dont have anyone to teach me please help me friends........


Solution

  • I think you should use RelativeLayout in order to generalize your app UI for all kind of screen resolutions.