Jetpack Compose Screen Orientation: Detect and Lock

handle configuration changes like screen rotations in an Android application

Detect and lock screen orientation in Jetpack Compose with LocalConfiguration, requestedOrientation and the manifest. Handle rotation and state correctly.