如何旋转我的应用程序180度旋转后,设备180度颠倒颠倒? [英] How to rotate my application 180 degree upside down upon rotating device 180 degree upside down?

查看:260
本文介绍了如何旋转我的应用程序180度旋转后,设备180度颠倒颠倒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个应用程序,并配置它的方向是横向所以它会一直显示在设备上的横向视图。

I have developed one application and configured its orientation is Landscape so it will always display on landscape view on the device.

现在我想将它旋转180度上下颠倒,当用户旋转设备180度颠倒,因此会相应地调整显示给用户properly.At present如果我旋转装置180度颠倒,我应用程序不按旋转所以它会反向显示(从底部到顶部)为例进行相应的调整:假设我的活动对底部顶部2文本字段和2个按钮,因此,如果您旋转设备180度上攻下来,活动不调整相应,所以用户可以看到在上面和文本字段按钮上底部这是错误的,应该调整/旋转具体根据设备的旋转和必须显示上底的顶部和按钮文本字段。

Now i want to rotate it 180 degree upside down when user rotate the device 180 degree upside down so it will adjust accordingly and displays to the user properly.At present if I am rotating device 180 degree upside down, My application doesn't adjust accordingly as per the rotation so it will display in reverse (from bottom to top) for example: suppose my activity is having 2 text fields on the top and 2 buttons on the bottom so if you rotate device 180 degree upside down, Activity is not adjusting accordingly, so user can see buttons on the top and text fields are on bottom which is wrong it should adjust/rotate as per the device rotation and must display text fields on the top and buttons on bottom.

请提供您宝贵的解决方案来解决这个问题。

Please provide your valuable solutions to resolve this problem.

问候, 皮克斯

推荐答案

说明:

安卓screenOrientation =sensorLandscape

android:screenOrientation="sensorLandscape"

在你的Andr​​oidManifest.xml中。这将改变景观和reverseLandscape之间的应用程序。

in your AndroidManifest.xml. This will transform application between landscape and reverseLandscape.

这篇关于如何旋转我的应用程序180度旋转后,设备180度颠倒颠倒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆