What is the difference between Display.getRotation() and Display.getOrientation() apart from the fact that it Display.getOrientation() is deprecated?
Do both return an int
equal to one of Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_180, Surface.ROTATION_270?
getRotation() just calls the deprecated method getOrientation(), check the source code of class Display. So it seems to have been deprecated merely for a better name.
The two methods are exactly the same, getRotation() simply calls getOrientation(). For this reason, I am using getOrientation() in my app in order to add support for lower Android levels. I see no reason to limit my ability to distribute my app simply so it can have a different method name. Thus, I completely agree with jap1968.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With