简体   繁体   English

android中的屏幕旋转

[英]screen rotation in android

I want to use screen rotation in android device. 我想在Android设备中使用屏幕旋转。 But I don't want to rotate whole activity. 但是我不想轮流整个活动。 How is this possible to rotate only some of views in a activity 如何仅旋转活动中的某些视图

Like there are two button and one ImageView. 就像有两个按钮和一个ImageView。 I want to rotate only ImageView on screen orientation change. 我只想在屏幕方向更改时旋转ImageView。

Plz suggest the way. 请提出建议。

Thanks. 谢谢。

Create another xml file with same name and put it in new folder inside res/ folder. 创建另一个具有相同名称的xml文件,并将其放在res /文件夹中的新文件夹中。 Name that new folder layout-land. 命名该新文件夹的布局。 and change in your xml file according to your requirements. 并根据需要更改xml文件。 It will automatically change the layout file when the orientation will be changed. 更改方向后,它将自动更改布局文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM