diff --git a/Crane/app/src/main/AndroidManifest.xml b/Crane/app/src/main/AndroidManifest.xml index d8b90988e9..5487c6a10a 100644 --- a/Crane/app/src/main/AndroidManifest.xml +++ b/Crane/app/src/main/AndroidManifest.xml @@ -46,7 +46,8 @@ + android:exported="true" + android:windowSoftInputMode="adjustResize"> @@ -55,7 +56,8 @@ + android:exported="false" + android:windowSoftInputMode="adjustResize" /> diff --git a/Crane/app/src/main/java/androidx/compose/samples/crane/details/DetailsActivity.kt b/Crane/app/src/main/java/androidx/compose/samples/crane/details/DetailsActivity.kt index 6807af679b..dbed9d71a9 100644 --- a/Crane/app/src/main/java/androidx/compose/samples/crane/details/DetailsActivity.kt +++ b/Crane/app/src/main/java/androidx/compose/samples/crane/details/DetailsActivity.kt @@ -18,10 +18,13 @@ package androidx.compose.samples.crane.details import android.content.Context import android.content.Intent +import android.graphics.Color import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.annotation.VisibleForTesting import androidx.compose.animation.Crossfade import androidx.compose.foundation.layout.Arrangement @@ -54,7 +57,6 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import androidx.core.view.WindowCompat import androidx.lifecycle.viewmodel.compose.viewModel import com.google.android.gms.maps.CameraUpdateFactory import com.google.android.gms.maps.model.CameraPosition @@ -85,10 +87,9 @@ fun createDetailsActivityIntent(context: Context, item: ExploreModel): Intent { @AndroidEntryPoint class DetailsActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { + enableEdgeToEdge(statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT)) super.onCreate(savedInstanceState) - WindowCompat.setDecorFitsSystemWindows(window, false) - setContent { CraneTheme { Surface { diff --git a/Crane/app/src/main/java/androidx/compose/samples/crane/home/MainActivity.kt b/Crane/app/src/main/java/androidx/compose/samples/crane/home/MainActivity.kt index 5333b3869d..026c5aff7c 100644 --- a/Crane/app/src/main/java/androidx/compose/samples/crane/home/MainActivity.kt +++ b/Crane/app/src/main/java/androidx/compose/samples/crane/home/MainActivity.kt @@ -16,9 +16,12 @@ package androidx.compose.samples.crane.home +import android.graphics.Color import android.os.Bundle import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.annotation.VisibleForTesting import androidx.compose.animation.core.MutableTransitionState import androidx.compose.animation.core.Spring.StiffnessLow @@ -51,7 +54,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import androidx.core.view.WindowCompat import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable @@ -63,10 +65,9 @@ import dagger.hilt.android.AndroidEntryPoint class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { + enableEdgeToEdge(statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT)) super.onCreate(savedInstanceState) - WindowCompat.setDecorFitsSystemWindows(window, false) - setContent { CraneTheme { val widthSizeClass = calculateWindowSizeClass(this).widthSizeClass