Just follow the following steps:
- Click on the encircled icon in Android Studio as shown in the following image:
- Select the option-‘Create Landscape Variation’ from the drop-down menu:
- That’s it! Android Studio will now create a landscape variation of your layout file. You can now edit the landscape layout separately.
- Click on the encircled button as shown below to toggle between portrait and landscape layouts:
Not using ANDROID STUDIO??
If you are using any other IDE like Eclipse then alternatively you can create a folder ‘layout-land’ inside the ‘res’ folder of your app.
That’s it!!! I hope that helped.
If you have any questions or doubts drop them in the comments section below.
Watch the following video for a video version of the above tutorial.