Android studio layout editor always landscape?

591 views Asked by At

My app is going to be just landscape. But each time I need to set the xml layout editor to landscape mode when I start editing a layout. How can I have my xml layout editor always stay in landscape mode?

2

There are 2 answers

0
Marcel Hofgesang On

You can do it exactly like @alireza daryani suggested.

  1. Open your layout.xml
  2. Choose Create landscape variation

Create landscape variation

  1. If you don't need the porttrait variation delete it

"Create landscape variation" will create a layout-land folder in your project so Android Studio will know that these layouts shall be previewed in landscape mode. Into this folder will be an exact copy your origin layout. In my case I just wanted landscape layout for my app, so I deleted the origins. Works perfect.

2
alireza daryani On

you must build layouts on Landscape variation. image

so you can choose this on top bar of android studio xml design.