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