class AutoRotateLayout : RelativeLayout, OrientationSensor.OrientationListener
Rotate on device rotation it use the OrientationSensor Class. To use it the OrientationSensor must be start on Activity resume and stop on Activity pause.
AutoRotateLayout(context: Context) AutoRotateLayout(context: Context, attrs: AttributeSet) AutoRotateLayout(context: Context, attrs: AttributeSet, defStyleAttr: int) |
fun onAttachedToWindow(): void |
|
fun onDetachedFromWindow(): void |
|
fun onOrientationChange(screenOrientation: OrientationSensor.ScreenOrientation): void |