Android: alternate layout xml for landscape mode

后端 未结 6 608
故里飘歌
故里飘歌 2020-11-22 08:54

How can I have one layout for landscape and one for portrait? I want to assume extra width and conserve vertical space when the user rotates the phone over sideways.

6条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 09:18

    In the current version of Android Studio (v1.0.2) you can simply add a landscape layout by clicking on the button in the visual editor shown in the screenshot below. Select "Create Landscape Variation"

    Android Studio add landscape layout

提交回复
热议问题