1. In the Project Tools window, right-click the Res directory and select the New--android Resource Directory menu item.
2. Select layout from the Resource type resource type list to keep the main option of the source set intact.
3. Select orientation in the list of selected resource features and click the button to move to the selected Resource feature area on the right.
4. Confirm the landscape option for the selected screen orientation drop-down list and make sure the directory name is displayed as Layout-land, click OK to create the Res/layout-land directory.
The-land suffix name here is another example of the configuration modifier used. When the device is in the horizontal direction, Android automatically finds and uses the layout resources under the Res/layout-land directory. In other cases, the Res/layout directory is used by default.
Copy the default file for vertical mode res/layout. XML directly to the Res/layout-land, noting that two files must have the same file name to be referenced with the same resource ID.
Note: The Res/layout-land is not displayed when project is tuned to Android in the upper left corner.
Extension: Save data before device rotation ...
Device rotation, creating a horizontal mode layout--android Studio