mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
fix reversed portrait not working
This commit is contained in:
parent
f7f29c5f64
commit
60ea36c0db
@ -35,7 +35,7 @@
|
||||
android:supportsPictureInPicture="true"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
|
||||
android:hardwareAccelerated="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:screenOrientation="userPortrait"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -87,7 +87,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
} else {
|
||||
setContentView(R.layout.activity_main)
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
|
||||
bottomNavigationView = findViewById(R.id.bottomNav)
|
||||
navController = findNavController(R.id.fragment)
|
||||
@ -266,7 +266,7 @@ class MainActivity : AppCompatActivity() {
|
||||
findViewById<ConstraintLayout>(R.id.main_container).isClickable = false
|
||||
val motionLayout = findViewById<MotionLayout>(R.id.playerMotionLayout)
|
||||
motionLayout.transitionToEnd()
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
with(motionLayout) {
|
||||
getConstraintSet(R.id.start).constrainHeight(R.id.player, 0)
|
||||
enableTransition(R.id.yt_transition, true)
|
||||
|
@ -209,7 +209,7 @@ class PlayerFragment : Fragment() {
|
||||
view.findViewById<ImageView>(R.id.close_imageView).setOnClickListener {
|
||||
motionLayout.transitionToEnd()
|
||||
val mainActivity = activity as MainActivity
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
mainActivity.supportFragmentManager.beginTransaction()
|
||||
.remove(this)
|
||||
.commit()
|
||||
@ -217,7 +217,7 @@ class PlayerFragment : Fragment() {
|
||||
view.findViewById<ImageButton>(R.id.close_imageButton).setOnClickListener {
|
||||
motionLayout.transitionToEnd()
|
||||
val mainActivity = activity as MainActivity
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
mainActivity.supportFragmentManager.beginTransaction()
|
||||
.remove(this)
|
||||
.commit()
|
||||
@ -289,7 +289,7 @@ class PlayerFragment : Fragment() {
|
||||
view.findViewById<ConstraintLayout>(R.id.main_container).isClickable = false
|
||||
view.findViewById<LinearLayout>(R.id.linLayout).visibility = View.VISIBLE
|
||||
val mainActivity = activity as MainActivity
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
isFullScreen = false
|
||||
}
|
||||
}
|
||||
@ -983,7 +983,7 @@ class PlayerFragment : Fragment() {
|
||||
view?.findViewById<LinearLayout>(R.id.linLayout)?.visibility = View.GONE
|
||||
view?.findViewById<FrameLayout>(R.id.top_bar)?.visibility = View.GONE
|
||||
val mainActivity = activity as MainActivity
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
isFullScreen = false
|
||||
} else {
|
||||
with(motionLayout) {
|
||||
|
Loading…
Reference in New Issue
Block a user