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 31
31
<activity
32
32
android : name =" .SnippetsActivity"
33
33
android : exported =" true"
34
- android : label =" @string/app_name"
35
34
android : theme =" @style/Theme.Snippets" >
36
35
<intent-filter >
37
36
<action android : name =" android.intent.action.MAIN" />
44
43
android : value =" " />
45
44
</activity >
46
45
46
+ <activity android : name =" .layouts.InsetSnippetActivity"
47
+ android : exported =" false" />
48
+
47
49
<activity android : name =" MyActivity"
48
50
android : exported =" false" />
49
51
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ package com.example.compose.snippets.layouts
21
21
import android.os.Bundle
22
22
import androidx.activity.ComponentActivity
23
23
import androidx.activity.compose.setContent
24
+ import androidx.activity.enableEdgeToEdge
24
25
import androidx.compose.foundation.background
25
26
import androidx.compose.foundation.layout.Box
26
27
import androidx.compose.foundation.layout.Column
@@ -52,15 +53,14 @@ import androidx.compose.ui.Modifier
52
53
import androidx.compose.ui.graphics.Color
53
54
import androidx.compose.ui.tooling.preview.Preview
54
55
import androidx.compose.ui.unit.dp
55
- import androidx.core.view.WindowCompat
56
56
57
57
class InsetSnippetActivity : ComponentActivity () {
58
58
59
59
// [START android_compose_insets_app_wide_safe_drawing]
60
60
override fun onCreate (savedInstanceState : Bundle ? ) {
61
61
super .onCreate(savedInstanceState)
62
62
63
- WindowCompat .setDecorFitsSystemWindows(window, false )
63
+ enableEdgeToEdge( )
64
64
65
65
setContent {
66
66
Box (Modifier .safeDrawingPadding()) {
You can’t perform that action at this time.
0 commit comments