Skip to content

Commit

Permalink
[Jetchat] Support edge to edge (#1219)
Browse files Browse the repository at this point in the history
Supported already, simple migration
  • Loading branch information
JolandaVerhoef authored Nov 21, 2023
2 parents 2336412 + bdc8698 commit 8cf3301
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion Jetchat/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<activity
android:name=".NavActivity"
android:windowSoftInputMode="adjustResize"
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.example.compose.jetchat

import android.os.Bundle
import androidx.activity.compose.BackHandler
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.layout.consumeWindowInsets
Expand All @@ -30,7 +31,6 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.viewinterop.AndroidViewBinding
import androidx.core.os.bundleOf
import androidx.core.view.WindowCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
Expand All @@ -46,12 +46,9 @@ class NavActivity : AppCompatActivity() {

@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)

// Turn off the decor fitting system windows, which allows us to handle insets,
// including IME animations
WindowCompat.setDecorFitsSystemWindows(window, false)

setContentView(
ComposeView(this).apply {
consumeWindowInsets = false
Expand Down

0 comments on commit 8cf3301

Please sign in to comment.