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

test: Reply
 
LinkBack Thread Tools
Old September 26th, 2012, 07:23 AM   #1 (permalink)
Member
Thread Author (OP)
 
Join Date: Nov 2010
Location: London
Posts: 210
 
Device(s): HTC Desire HD, Samsung Galaxy SII, Samsung Galaxy Nexus, ASUS Nexus 7
Carrier: Not Provided

Thanks: 16
Thanked 8 Times in 7 Posts
Question How to properly use layout-large and layout-land. Do I even need to use them?

Hey all, pretty basic question I presume but at the moment I have 5 layout folders. layout, layout-small, layout-normal, layout-medium and layout-large.

My app is heavily image based. As a result I have created the proper images. mdpi, hdpi and xhdpi. I don't think I need to worry about ldpi since screens are only getting bigger.

With this in mind and the need for me to now create a good landscape layout for all my pages, how do I go about this? Is it simple layout-land? No need for large/small/normal again right?

Considering that I've got all my hdpi and xdpi images do I even need layout-medium, layout-large and layout-normal? Because the images will be adjusting themselves based on screensize surely I can use one layout and have that work for all screens..?

It's all getting very confusing now that I'm trying to add a landscape view to my app. It doesn't do it very well at the moment so I will probably have to design a landscape friendly layout so I can understand that I would need to rebuild all my layouts for this particular use (We're talking about 100 layous here but oh well, I can manage it. )

Advertisements
__________________
Twitter.

My Android apps: Link to play store.
RED_ is offline  
Reply With Quote
sponsored links
Old September 26th, 2012, 02:32 PM   #2 (permalink)
Premium Member
 
MSUgEEk's Avatar
 
Join Date: Apr 2010
Location: Northwestern Alabama
Posts: 3,689
 
Device(s): Galaxy Nexus
Carrier: Verizon

Thanks: 420
Thanked 1,622 Times in 956 Posts
Default

Is it intuitive to want to use the app in a landscape layout, portrait layout, or is it one that would be great either way? Some things just make more sense to be oriented Portrait and some moreso Landscape. Some it doesn't matter. If it makes more sense one way over another, then lock it to Portrait or Landscape only and be done with it.
__________________
If someone has helped you, hit the THANKS button.
If you just like a post for some reason, click LIKE.
If you see a trouble-maker, hit REPORT!
MSUgEEk is offline  
Reply With Quote
Old September 26th, 2012, 03:14 PM   #3 (permalink)
Member
Thread Author (OP)
 
Join Date: Nov 2010
Location: London
Posts: 210
 
Device(s): HTC Desire HD, Samsung Galaxy SII, Samsung Galaxy Nexus, ASUS Nexus 7
Carrier: Not Provided

Thanks: 16
Thanked 8 Times in 7 Posts
Default

That does sound very sensible. My app defintely is better viewed in potrait.. on a phone. I haven't got a tablet to test it on but I presume most people hold it in landscape mode so for a tablet it would probably be better to have it in landscape mode.

Is there a way to specify between tablet and phone?

It's a data based app, lots of data and it will be displayed in columns so you can understand how portrait is good for a phone. I guess it would be fine for a tablet too but wouldn't that limit usubility considering how most people use tablets?
RED_ is offline  
Reply With Quote
Old September 27th, 2012, 02:25 AM   #4 (permalink)
Junior Member
 
Join Date: Aug 2012
Location: Athens, Greece
Posts: 42
 
Device(s):
Carrier: Not Provided

Thanks: 6
Thanked 7 Times in 7 Posts
Default

In my opinion you should definitely have a layout and a layout-land implementation. Depending on your application, it may be also good to have layout-land-large. For example in a small to medium screen you are only have two columns, but in a large screen you have enough room for a third one. The third one could be a View that you normally show in a different Activity. You don't have to define all the set of layout-land-small, layout-land-medium and the like. The layout-land can be used as the default, which will handle all the cases, with the exception of layout-land-large, which will have a different treatment.

You also need to define different styles for large screens. Make all your widgets use a style and then create a values/styles.xml and a values-large/styles.xml. In large screens you should have bigger sizes and margins and of course bigger text. In many cases this will be enough and you won't need a different layout.

Don't make any assumptions on how the users use their phone and tablet. Some like holding it in landscape and some other in portrait mode. Also the distinction between phone and tablet is sometimes vague. Better to stick on screen sizes.
Kostas G is offline  
Reply With Quote
Old September 27th, 2012, 07:10 AM   #5 (permalink)
Premium Member
 
MSUgEEk's Avatar
 
Join Date: Apr 2010
Location: Northwestern Alabama
Posts: 3,689
 
Device(s): Galaxy Nexus
Carrier: Verizon

Thanks: 420
Thanked 1,622 Times in 956 Posts
Default

Quote:
Originally Posted by Kostas G View Post
Also the distinction between phone and tablet is sometimes vague. Better to stick on screen sizes.
Very true. What is a Nexus 7 It's a tablet but the default layout orientation is like a phone. With the introduction of so many 7" tablets, most people use them in portrait layout because they are designed to be held like a book for reading purposes.

Check out my app. I use columns in it as well but it just made more sense to have it in portait mode because of the way it is used. It's an easy grader app so teachers will have it placed beside a stack of papers while grading, and with the amount of data displayed, it just made more sense to lock to portrait.

https://play.google.com/store/apps/details?id=teacherapps.easygrader.free&hl=en

I also see the other side of the argument though as not to make assumptions on how people use their phone/tablet. If you really want a properly displayed landscape layout, you definitely need to re-define the layouts specifically for landscape and in different sizes.
MSUgEEk is offline  
Reply With Quote
Old September 27th, 2012, 01:53 PM   #6 (permalink)
Member
Thread Author (OP)
 
Join Date: Nov 2010
Location: London
Posts: 210
 
Device(s): HTC Desire HD, Samsung Galaxy SII, Samsung Galaxy Nexus, ASUS Nexus 7
Carrier: Not Provided

Thanks: 16
Thanked 8 Times in 7 Posts
Default

Thanks for the input lads.

I defintely have to adjust for text sizes which is why I have been creating layout-large & layout-xlarge etc. I have a lot of layouts and to change the text size I have to recreate each layout in the correct folders and change the text sizes. It's a right pain in the arse but I don't see another way around it.

I guess all in all I should give the user the option of a landscape mode but advise them with a little note that portrait mode is the best way to view this application. I agree that 7" tablets tend to be held like a book but then I do want to accomdate as many users as possible. 10.1" basically.

To be perfectly honest I have so many layouts that adjusting them all to have a landscape mode in both normal and large sizes would be one hell of a job. Seriously. I'm not sure it's something I'm prepared to do..

You know what, I might just stick to portait only but obviously implement layout-large and layout-xlarge to allow for the text sizes to be adjusted and overall look to fit screen sizes.
RED_ is offline  
Reply With Quote
Reply


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:05 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.