isCurrentOrientationValid

fun isCurrentOrientationValid(currentScreenOrientation: Int, preferredOrientation: Orientation): Boolean

Return

Whether the current screen orientation (e.g. Configuration.ORIENTATION_LANDSCAPE) matches the preferred orientation (e.g. Orientation.LANDSCAPE.