Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compose/snippets/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<activity
android:name=".SnippetsActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Snippets">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -44,6 +43,9 @@
android:value="" />
</activity>

<activity android:name=".layouts.InsetSnippetActivity"
android:exported="false"/>

<activity android:name="MyActivity"
android:exported="false"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package com.example.compose.snippets.layouts
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -52,15 +53,14 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.view.WindowCompat

class InsetSnippetActivity : ComponentActivity() {

// [START android_compose_insets_app_wide_safe_drawing]
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdge()

setContent {
Box(Modifier.safeDrawingPadding()) {
Expand Down