File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
compose/snippets/src/main
java/com/example/compose/snippets/layouts Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 3131 <activity
3232 android : name =" .SnippetsActivity"
3333 android : exported =" true"
34- android : label =" @string/app_name"
3534 android : theme =" @style/Theme.Snippets" >
3635 <intent-filter >
3736 <action android : name =" android.intent.action.MAIN" />
4443 android : value =" " />
4544 </activity >
4645
46+ <activity android : name =" .layouts.InsetSnippetActivity"
47+ android : exported =" false" />
48+
4749 <activity android : name =" MyActivity"
4850 android : exported =" false" />
4951
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ package com.example.compose.snippets.layouts
2121import android.os.Bundle
2222import androidx.activity.ComponentActivity
2323import androidx.activity.compose.setContent
24+ import androidx.activity.enableEdgeToEdge
2425import androidx.compose.foundation.background
2526import androidx.compose.foundation.layout.Box
2627import androidx.compose.foundation.layout.Column
@@ -52,15 +53,14 @@ import androidx.compose.ui.Modifier
5253import androidx.compose.ui.graphics.Color
5354import androidx.compose.ui.tooling.preview.Preview
5455import androidx.compose.ui.unit.dp
55- import androidx.core.view.WindowCompat
5656
5757class InsetSnippetActivity : ComponentActivity () {
5858
5959 // [START android_compose_insets_app_wide_safe_drawing]
6060 override fun onCreate (savedInstanceState : Bundle ? ) {
6161 super .onCreate(savedInstanceState)
6262
63- WindowCompat .setDecorFitsSystemWindows(window, false )
63+ enableEdgeToEdge( )
6464
6565 setContent {
6666 Box (Modifier .safeDrawingPadding()) {
You can’t perform that action at this time.
0 commit comments