Package 

Object ScaleTypeTransform

    • Method Detail

      • isNaturalPortrait

         final static Boolean isNaturalPortrait(Context context, Integer rotationDegrees)

        Determines whether the current device is a natural portrait-oriented device

        Using the current app's window to determine whether the device is a natural portrait-oriented device doesn't work in all scenarios, one example of this is multi-window mode. Taking a natural portrait-oriented device in multi-window mode, rotating it 90 degrees (so that it's in landscape), with the app open, and its window's width being smaller than its height. Using the app's width and height would determine that the device isn't naturally portrait-oriented, where in fact it is, which is why it is important to use the size of the device instead.

        Parameters:
        context - Current context.
        rotationDegrees - The device's rotation in degrees from its natural orientation.