-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
  • 816
  • 8
  • 21
  • 35

3 Answers3

2

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

Bahram
  • 1,304
  • 2
  • 19
  • 37
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
  • 12,758
  • 12
  • 60
  • 107
1

Use folder like below in your res folder

  • layout-small-land
  • layout-normal-land
  • layout-large-land
  • layout-xlarge-land
Harish Godara
  • 2,685
  • 1
  • 13
  • 30