-1

I want to know how to use an altarnative layout to use it if the user use his phone in a landscape mode, how to make my app has a good diminsions for this mode ?

Akari
  • 856
  • 8
  • 21
  • 36

3 Answers3

2

You should add layout-land folder and add a file with same name according to layout.

Bahram
  • 1,464
  • 2
  • 22
  • 38
1

Add a layout-land folder in the res folder. If the device is in landscape mode, it will first look into the layout-land folder for the right layout. If it can't be found there, it will look in the default layout folder.

You could also work the other way around and create a layout-port folder and put your portrait layouts in there.

More information on this can be found here

dumazy
  • 13,857
  • 12
  • 66
  • 113
1

Use folder like below in your res folder

  • layout-small-land
  • layout-normal-land
  • layout-large-land
  • layout-xlarge-land
Harish Godara
  • 2,388
  • 1
  • 14
  • 28