diff --git a/app/src/main/java/xyz/btcland/libretube/MainActivity.kt b/app/src/main/java/xyz/btcland/libretube/MainActivity.kt index 1e9b452a2..f2e930c16 100644 --- a/app/src/main/java/xyz/btcland/libretube/MainActivity.kt +++ b/app/src/main/java/xyz/btcland/libretube/MainActivity.kt @@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.Menu import android.view.MenuItem +import android.view.View import android.widget.FrameLayout import androidx.appcompat.widget.Toolbar import androidx.constraintlayout.motion.widget.MotionLayout @@ -74,6 +75,13 @@ class MainActivity : AppCompatActivity() { //findViewById(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = true } else if (orientation == Configuration.ORIENTATION_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(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = false }