mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
hide status bars on rotation
This commit is contained in:
parent
5ac92806a1
commit
ea82e4ec70
@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
import android.view.View
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.constraintlayout.motion.widget.MotionLayout
|
import androidx.constraintlayout.motion.widget.MotionLayout
|
||||||
@ -74,6 +75,13 @@ class MainActivity : AppCompatActivity() {
|
|||||||
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = true
|
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = true
|
||||||
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||||
println("Landscape")
|
println("Landscape")
|
||||||
|
window.decorView.apply {
|
||||||
|
// Hide both the navigation bar and the status bar.
|
||||||
|
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
|
||||||
|
// a general rule, you should design your app to hide the status bar whenever you
|
||||||
|
// hide the navigation bar.
|
||||||
|
systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||||
|
}
|
||||||
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = false
|
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user