• This is particularly important because the natural orientation of most
early Android phones was portrait; however, with the range of
Android devices having expanded to also include tablets and
televisions, many Android devices (including smartphones) are
naturally oriented when the display is in landscape.
• To ensure that you are interpreting the orientation correctly, you
need to determine the current display orientation relative to the
natural orientation, rather than relying on the current display mode
being either portrait or landscape.
• You can find the current screen rotation using the getRotation
method on the default Display object, as shown in Example3.