Android 纵向和横向布局

Lec*_*ico 2 layout android landscape portrait

我有以下布局:

在此处输入图片说明

我在纵向模式下需要以下布局:

在此处输入图片说明

但是,我获得了以下一个,但我不知道如何修改它:

在此处输入图片说明

我怎样才能做到这一点?

Shi*_*hid 5

Fastest way for Android Studio 3.x.x

1.Go to the design tab of the activity layout

2.At the top you should press on the orientation for preview button, there is a option to create a landscape layout (check image), a new folder will be created as your xml layout file for that particular orientation

在此处输入图片说明


小智 4

在文件夹中创建一个layout-land文件夹res,并在该文件夹中创建xml同名的文件夹。