问题描述
什么是屏幕方向和-rotation在Android上有什么区别?这些术语通常可互换使用,似乎在网络上。
What's the difference between Screen Orientation and -Rotation on Android? The terms are often used interchangeably on the web it seems.
据上的德precation 讨论Display.getOrientation()的getRotation()的概念经常被误解/混淆。不进一步说明但是提供
According to a discussion on the deprecation of Display.getOrientation() for getRotation() the concepts are often misunderstood/confused. No further explanation is provided however.
我怀疑它理解方向和旋转的Android设备上的复杂性,即使在充满异国情调的设备可以正确显示的应用程序很重要。
I suspect it's important to understand the intricacies of Orientation and Rotation on Android devices to correctly display an App even on exotic devices.
推荐答案
在你给小姐戴安娜Hackborn明确说明的联系;
At the link you gave Miss Dianne Hackborn clearly stated;
getOrientation()从未返回方向,它返回旋转所以它被重命名为getRotation()这是的多的减少混乱其实你感到困惑 - 。你以为它返回方向,当它没有。
"getOrientation() has never returned orientation, it returns rotation. So it is being renamed to getRotation(). This is much less confusing. In fact you were confused -- you thought it returned orientation, when it does not."
要描述更加深刻;
- 定位:是概念界定的风景,肖像,...
- 旋转:返回从屏幕的旋转的天然的取向。的自然取向在这里很重要的,因为它是横向上更小的设备片剂和肖像。
- Orientation: is concept for defining landscape, portrait, ...
- Rotation: Returns the rotation of the screen from its "natural" orientation. The natural orientation is important here, because it is landscape on tablets and portrait on smaller devices.
这篇关于什么是屏幕方向和-rotation在Android上有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!