Skip to content

Commit 0c0f3e5

Browse files
authored
Fix dev-app UI for edge-to-edge (#122)
Pad the UI so it doesn't appear under the system title bar when edge-to-edge is enabled.
1 parent 9460bc9 commit 0c0f3e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dev-app/src/main/java/com/uid2/dev/MainActivity.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.activity.viewModels
7+
import androidx.compose.foundation.layout.Box
8+
import androidx.compose.foundation.layout.safeDrawingPadding
79
import androidx.compose.material.MaterialTheme
10+
import androidx.compose.ui.Modifier
811
import com.uid2.EUIDManager
912
import com.uid2.UID2Manager
1013
import com.uid2.dev.network.AppUID2Client
@@ -34,8 +37,11 @@ class MainActivity : ComponentActivity() {
3437
}
3538

3639
setContent {
37-
MaterialTheme {
38-
MainScreen(viewModel)
40+
Box(Modifier.safeDrawingPadding()) {
41+
// the rest of the app
42+
MaterialTheme {
43+
MainScreen(viewModel)
44+
}
3945
}
4046
}
4147
}

0 commit comments

Comments
 (0)