屏幕方向更改时的旋转视图(但不更改布局)
问题描述:
我想旋转Buttons/TextViews/etc.屏幕方向改变,但我想保持布局不变.怎么做到呢?我正在使用LinearLayouts.
I would like to rotate Buttons/TextViews/etc. on screen orientation change but I want to keep layout unchanged. How can it be done? I'm using LinearLayouts.
这是我的意思:
答
创建
res->layout->layout-land
并将您的xml文件放置为横向 模式
Create
res->layout->layout-land
and put your xml file for landscape mode
layout
文件夹中的布局文件仅用于纵向模式.现在,如果需要横向,请创建layout-land
文件夹.
Your layout file in layout
folder is only for portrait mode Now if you need landscape then create layout-land
folder.