Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
LinkBack Thread Tools
Old April 26th, 2011, 08:07 AM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Apr 2011
Location: England
Posts: 9
Device(s): Samsung Galaxy Nexus, Asus Transformer Prime TF201
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Griffolion is offline  
Reply With Quote
sponsored links
Old April 26th, 2011, 11:09 AM   #2 (permalink)
Join Date: Jun 2010
Posts: 363
Device(s): Samsung Galaxy S (international)
Carrier: Not Provided

Thanks: 72
Thanked 58 Times in 55 Posts

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
if I ever said anything that helped you , the thanks button is where your cursor/finger should head to
JiMMaR is offline  
Reply With Quote
Old November 29th, 2012, 04:16 AM   #3 (permalink)
Junior Member
Join Date: Jul 2010
Location: Chandigarh, India
Posts: 19
Device(s): Motorola Photon 4G
Carrier: Not Provided

Thanks: 10
Thanked 6 Times in 4 Posts
Send a message via ICQ to kikloo Send a message via MSN to kikloo Send a message via Yahoo to kikloo


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

kikloo is offline  
Reply With Quote
Old November 29th, 2012, 09:53 AM   #4 (permalink)
New Member
Join Date: Nov 2012
Location: Littleton, CO
Gender: Male
Posts: 6
Device(s): HTC Sensation, Archos 70, ASUS Transformer Prime
Carrier: T-Mobile

Thanks: 0
Thanked 1 Time in 1 Post

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.
mrichards957 is offline  
Reply With Quote

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 09:01 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.