Skip to content

Commit 2e30a43

Browse files
committed
Use safeDrawingPadding() to avoid drawing under insets
1 parent 3236c72 commit 2e30a43

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/src/main/java/org/stypox/tridenta/ui/MainActivity.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ package org.stypox.tridenta.ui
33
import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
6+
import androidx.compose.foundation.layout.Box
67
import androidx.compose.foundation.layout.fillMaxSize
8+
import androidx.compose.foundation.layout.safeDrawingPadding
79
import androidx.compose.material3.MaterialTheme
810
import androidx.compose.material3.Surface
911
import androidx.compose.ui.Modifier
@@ -34,11 +36,13 @@ class MainActivity : ComponentActivity() {
3436
modifier = Modifier.fillMaxSize(),
3537
color = MaterialTheme.colorScheme.background
3638
) {
37-
Navigation { currentDestination, setDirection ->
38-
DrawerSheetContent(
39-
currentDestination = currentDestination,
40-
setDirection = setDirection
41-
)
39+
Box(Modifier.safeDrawingPadding()) {
40+
Navigation { currentDestination, setDirection ->
41+
DrawerSheetContent(
42+
currentDestination = currentDestination,
43+
setDirection = setDirection
44+
)
45+
}
4246
}
4347
}
4448
}

0 commit comments

Comments
 (0)