We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aea6a99 commit 37f5fb4Copy full SHA for 37f5fb4
app/src/main/java/org/nsh07/pomodoro/ui/AlwaysOnDisplay.kt
@@ -65,13 +65,15 @@ fun SharedTransitionScope.AlwaysOnDisplay(
65
val insetsController = remember { WindowCompat.getInsetsController(window, view) }
66
67
DisposableEffect(Unit) {
68
+ view.keepScreenOn = true
69
insetsController.apply {
70
hide(WindowInsetsCompat.Type.statusBars())
71
hide(WindowInsetsCompat.Type.navigationBars())
72
systemBarsBehavior =
73
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
74
}
75
onDispose {
76
+ view.keepScreenOn = false
77
78
show(WindowInsetsCompat.Type.statusBars())
79
show(WindowInsetsCompat.Type.navigationBars())
0 commit comments