• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Screen Sizes..?

Hi everyone,

I was just wondering how you go about developing your app for different screen sizes. My first reaction was that you would have to develop a layout for each activity for each screen size/resolution you wanted to support, however i get the feeling it should be a little simpler than that.

So the layout for my app is called Main.xml and it's set up optimally for a 800x480 4.3" screen, what do i have to do to make the layout okay for different densities etc?

Do you work on the same XML layout for all your sizes or what? It confused me a little.
 
you probably should use the different layouts that android provides to make your layout general , as if you assigned a button to be stuck to the top of the screen and fill_parent width , it'll fill the width of the screen regardless of the resolution

and never use absolute layout , it's officially deprecated
 
Hi,

I am using Basic4Android and my development has stopped due the exactly same question. I am not sure how to handle different screen sizes ? :( Devs. are making apps like anything and I think it should be much simpler to handle different screen sizes but I am not sure how to do it :(

Thanks.
 
You've probably seen these, but here are the official docs on the subject:

Supporting Multiple Screens | Android Developers
Designing for Multiple Screens | Android Developers

Sometimes I make different layouts for portrait and landscape (in res/layout and res/layout-land), but generally I try to stick with one layout that scales to different resolutions. I target an 800x480 screen, and then test at a couple higher and lower resolutions. Android will drive you crazy if you try to target every possible screen size.
 
Back
Top Bottom