Last active
March 4, 2024 02:19
-
-
Save devstar0209/54f5d019e961359dbf3e53fe5b538134 to your computer and use it in GitHub Desktop.
hideSystemUi is a helper method called in onResume, which allows you to have a full-screen experience.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressLint("InlinedApi") | |
private fun hideSystemUi() { | |
WindowCompat.setDecorFitsSystemWindows(window, false) | |
WindowInsetsControllerCompat(window, viewBinding.videoView).let { controller -> | |
controller.hide(WindowInsetsCompat.Type.systemBars()) | |
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment