diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 796be4754..8b41fb872 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -124,7 +124,8 @@
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:parentActivityName=".activities.MediaActivity"/>
forceOrientation(true)
- R.id.menu_force_landscape -> forceOrientation(false)
+ R.id.menu_change_orientation -> changeOrientation()
else -> return super.onOptionsItemSelected(item)
}
return true
}
- private fun forceOrientation(portrait: Boolean) {
-
+ private fun changeOrientation() {
+ requestedOrientation = if (resources.configuration.orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
+ ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
+ } else {
+ ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
+ }
}
override fun fragmentClicked() {
diff --git a/app/src/main/res/menu/menu_video_player.xml b/app/src/main/res/menu/menu_video_player.xml
index 38daa699e..00e818ca3 100644
--- a/app/src/main/res/menu/menu_video_player.xml
+++ b/app/src/main/res/menu/menu_video_player.xml
@@ -2,14 +2,9 @@