Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Screen Orientation and -Rotation on Android?

What's the difference between Screen Orientation and -Rotation on Android? The terms are often used interchangeably on the web it seems.

According to a discussion on the deprecation of Display.getOrientation() for getRotation() the concepts are often misunderstood/confused. No further explanation is provided however.

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.

like image 954
Joseph Tanenbaum Avatar asked Oct 31 '25 10:10

Joseph Tanenbaum


1 Answers

At the link you gave Miss Dianne Hackborn clearly stated;

"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."

To describe more deeply;

  • 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.
like image 146
Gökhan Barış Aker Avatar answered Nov 01 '25 23:11

Gökhan Barış Aker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!