0

I am new to Android development. I am using Eclipse to develop an app which pulls info from a website. I selected a medium sized screen in Eclipse UI layout. I arranged various UI elements like buttons and spinners by varying the margin parameter from 4 sides. It looked perfect in same sized phones.

But when I run the app in phones like galaxy S3 the app layout concentrates itself into 1 part of screen. How can I overcome this and design a UI which appears somewhat same in all screen sizes (avoid tablets)?

Victor Zakharov
  • 25,801
  • 18
  • 85
  • 151
  • 1
    Check [this](http://developer.android.com/training/multiscreen/screensizes.html) – Mohamed_AbdAllah Jun 16 '13 at 12:53
  • i have already seen that.it mainly explains about various layouts like relative etc...and abt two pane apps..but as far as i know these things cant adjust the position of a ui element(only margin can do that precisely).i wan to know whether i can implement a dynamic margin which can be set as a factor of screen size. – user2488336 Jun 16 '13 at 13:01
  • It seems you did not fully read the document. You can create an entire layout for each screen size (/layout-mdpi, /layout-hdpi, /layout-xhdpi, ...etc) – Mohamed_AbdAllah Jun 16 '13 at 13:03
  • 1
    @user2488336 the way it stands now, your question has been asked [over](http://stackoverflow.com/questions/5726764/android-layouts-for-multiple-screen-sizes) and [over](http://stackoverflow.com/questions/6489525/different-layouts-for-different-screen-sizes-on-android) and [over](http://stackoverflow.com/questions/2638202/android-multiple-screen-sizes-with-same-density) again. Please amend it to justify keeping it. – verybadalloc Jun 16 '13 at 13:04

0 Answers0