Sunday, June 1, 2014

How to Create a Different Android Layout for Portrait and Landscape



1. Open the Android application project's main folder, followed by the project's 'res' folder.

2. Right-click inside the 'res' folder and select the 'New Folder' option. Name the folder 'layout-land.'

3. Place the landscape-specific resources for the project in the 'layout-land' folder. These resources will specify the layout of the project when the Android device is in landscape mode.

4. Right-click inside the 'res' folder and select the 'New Folder' option. Name the folder 'layout-port.'

5. Place the portrait-specific resources for the project in the 'layout-port' folder. These resources will specify the layout of the project when the Android device is in portrait mode.

No comments:

Post a Comment