Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set a landscape layout just for tablets?

Imagine I've a layout folder named layout-port. This layout contains the two-layouts you can see in the picture below (handset). In the other hand, I've a layout folder which is used when the screen orientation is not in portrait mode, so it's in landscape.

enter image description here

However, when I rotate a device with a small screen, it's going to use the portrait layout, but as the screen is so small, its not optimal and it doesn't look good as the two fragments layout is mainly focused for atleast 600dp tablets.

So the question is, Is there any way I can use a qualifier to set a Landscape layout for smallest width higher than 600?

I've been checking the docs http://developer.android.com/guide/practices/screens_support.html but it doesn't seem to be able to combine smallest width & orientation.

like image 275
Reinherd Avatar asked Sep 08 '13 11:09

Reinherd


People also ask

How do I force an app to landscape on my Android tablet?

When on the main screen, under the orientation section, you will see a number of options like 'Auto-rotate OFF', 'Auto-rotate ON', 'Forced Portrait' and 'Forced Landscape'. As the names suggest, you can use these buttons as one-tap shortcuts to toggle the orientation of your device.


1 Answers

I think what you really want is to declare a folder...

layout-w600dp-land

this will be invoked only if your tablet or w600dp device is in landscape mode. Basically you can combine qualifiers w600dp with land.

like image 170
deanresin Avatar answered Sep 26 '22 02:09

deanresin