diff --git a/app/src/main/java/com/google/maps/android/compose/AccessibilityActivity.kt b/app/src/main/java/com/google/maps/android/compose/AccessibilityActivity.kt index 1b52b1496..3e032238d 100644 --- a/app/src/main/java/com/google/maps/android/compose/AccessibilityActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/AccessibilityActivity.kt @@ -18,8 +18,10 @@ import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -33,6 +35,7 @@ class AccessibilityActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { val singaporeState = rememberMarkerState(position = singapore) val cameraPositionState = rememberCameraPositionState { @@ -43,7 +46,10 @@ class AccessibilityActivity : ComponentActivity() { mutableStateOf(MapProperties(mapType = MapType.NORMAL)) } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { GoogleMap( // mergeDescendants will remove accessibility from the entire map and content inside. mergeDescendants = true, diff --git a/app/src/main/java/com/google/maps/android/compose/BasicMapActivity.kt b/app/src/main/java/com/google/maps/android/compose/BasicMapActivity.kt index 8e7e735e8..aaf3e47d2 100644 --- a/app/src/main/java/com/google/maps/android/compose/BasicMapActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/BasicMapActivity.kt @@ -18,6 +18,7 @@ import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.EnterTransition import androidx.compose.animation.fadeOut @@ -33,6 +34,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.shape.RoundedCornerShape @@ -94,6 +96,7 @@ class BasicMapActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { var isMapLoaded by remember { mutableStateOf(false) } // Observing and controlling the camera's state can be done with a CameraPositionState @@ -101,7 +104,10 @@ class BasicMapActivity : ComponentActivity() { position = defaultCameraPosition } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding() + ) { GoogleMapView( cameraPositionState = cameraPositionState, onMapLoaded = { diff --git a/app/src/main/java/com/google/maps/android/compose/CustomControlsActivity.kt b/app/src/main/java/com/google/maps/android/compose/CustomControlsActivity.kt index eb18a4f22..fdb204e3b 100644 --- a/app/src/main/java/com/google/maps/android/compose/CustomControlsActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/CustomControlsActivity.kt @@ -18,6 +18,7 @@ import android.os.Bundle import android.widget.Toast import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.EnterTransition import androidx.compose.animation.fadeOut @@ -27,6 +28,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.Button import androidx.compose.material.ButtonDefaults @@ -49,7 +51,7 @@ class CustomControlsActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { var isMapLoaded by remember { mutableStateOf(false) } val coroutineScope = rememberCoroutineScope() @@ -68,7 +70,10 @@ class CustomControlsActivity : ComponentActivity() { position = defaultCameraPosition } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { GoogleMap( modifier = Modifier.matchParentSize(), cameraPositionState = cameraPositionState, diff --git a/app/src/main/java/com/google/maps/android/compose/LocationTrackingActivity.kt b/app/src/main/java/com/google/maps/android/compose/LocationTrackingActivity.kt index 3eed60a0e..1ed7baa72 100644 --- a/app/src/main/java/com/google/maps/android/compose/LocationTrackingActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/LocationTrackingActivity.kt @@ -19,6 +19,7 @@ import android.location.Location import android.os.Bundle import android.util.Log import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.EnterTransition @@ -26,6 +27,7 @@ import androidx.compose.animation.fadeOut import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.MaterialTheme @@ -76,7 +78,7 @@ class LocationTrackingActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { var isMapLoaded by remember { mutableStateOf(false) } @@ -108,7 +110,10 @@ class LocationTrackingActivity : AppCompatActivity() { } } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { GoogleMap( modifier = Modifier.matchParentSize(), cameraPositionState = cameraPositionState, diff --git a/app/src/main/java/com/google/maps/android/compose/MainActivity.kt b/app/src/main/java/com/google/maps/android/compose/MainActivity.kt index ea0c1a17b..c7dbd8af8 100644 --- a/app/src/main/java/com/google/maps/android/compose/MainActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/MainActivity.kt @@ -18,10 +18,12 @@ import android.content.Intent import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material.Button @@ -45,10 +47,12 @@ class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { MapsComposeSampleTheme { Surface( - modifier = Modifier.fillMaxSize(), + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), color = MaterialTheme.colors.background ) { val context = LocalContext.current diff --git a/app/src/main/java/com/google/maps/android/compose/MapInColumnActivity.kt b/app/src/main/java/com/google/maps/android/compose/MapInColumnActivity.kt index 087a42b9c..1908df89f 100644 --- a/app/src/main/java/com/google/maps/android/compose/MapInColumnActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/MapInColumnActivity.kt @@ -19,6 +19,7 @@ import android.util.Log import android.view.MotionEvent import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.animation.EnterTransition import androidx.compose.animation.fadeOut import androidx.compose.foundation.background @@ -47,6 +48,7 @@ class MapInColumnActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { // Observing and controlling the camera's state can be done with a CameraPositionState val cameraPositionState = rememberCameraPositionState { @@ -63,7 +65,8 @@ class MapInColumnActivity : ComponentActivity() { } MapInColumn( - modifier = Modifier.fillMaxSize(), + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), cameraPositionState, columnScrollingEnabled = columnScrollingEnabled, onMapTouched = { diff --git a/app/src/main/java/com/google/maps/android/compose/MapsInLazyColumnActivity.kt b/app/src/main/java/com/google/maps/android/compose/MapsInLazyColumnActivity.kt index c53d3b6b1..36459b150 100644 --- a/app/src/main/java/com/google/maps/android/compose/MapsInLazyColumnActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/MapsInLazyColumnActivity.kt @@ -3,6 +3,7 @@ package com.google.maps.android.compose import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut @@ -17,6 +18,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState @@ -86,7 +88,7 @@ private val allItems = countries.mapIndexed { index, country -> class MapsInLazyColumnActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { var showLazyColumn by rememberSaveable { mutableStateOf(true) } var visibleItems by rememberSaveable { mutableStateOf(allItems) } @@ -95,7 +97,10 @@ class MapsInLazyColumnActivity : ComponentActivity() { visibleItems = allItems.take(count.coerceIn(0, allItems.size)) } - Column { + Column( + Modifier.fillMaxSize() + .systemBarsPadding(), + ) { Row( Modifier .fillMaxWidth() diff --git a/app/src/main/java/com/google/maps/android/compose/RecompositionActivity.kt b/app/src/main/java/com/google/maps/android/compose/RecompositionActivity.kt index 1154dc514..d0fc8cd50 100644 --- a/app/src/main/java/com/google/maps/android/compose/RecompositionActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/RecompositionActivity.kt @@ -18,9 +18,11 @@ import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.material.Button import androidx.compose.material.Text import androidx.compose.runtime.Composable @@ -43,11 +45,15 @@ class RecompositionActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { val cameraPositionState = rememberCameraPositionState { position = defaultCameraPosition } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { MapsComposeSampleTheme { GoogleMapView( modifier = Modifier.matchParentSize(), diff --git a/app/src/main/java/com/google/maps/android/compose/ScaleBarActivity.kt b/app/src/main/java/com/google/maps/android/compose/ScaleBarActivity.kt index 501cb9f63..172632b69 100644 --- a/app/src/main/java/com/google/maps/android/compose/ScaleBarActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/ScaleBarActivity.kt @@ -17,6 +17,7 @@ package com.google.maps.android.compose import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.EnterTransition import androidx.compose.animation.fadeOut @@ -26,6 +27,7 @@ import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.MaterialTheme @@ -44,7 +46,7 @@ class ScaleBarActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { var isMapLoaded by remember { mutableStateOf(false) } @@ -56,7 +58,10 @@ class ScaleBarActivity : ComponentActivity() { val scaleBackground = MaterialTheme.colors.background.copy(alpha = 0.4f) val scaleBorderStroke = BorderStroke(width = 1.dp, DarkGray.copy(alpha = 0.2f)) - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { GoogleMap( modifier = Modifier.matchParentSize(), cameraPositionState = cameraPositionState, diff --git a/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt b/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt index f190b2070..1ca54a9b1 100644 --- a/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt @@ -18,6 +18,7 @@ import android.os.Bundle import android.util.Log 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 @@ -26,6 +27,7 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.material.Switch import androidx.compose.material.Text import androidx.compose.runtime.Composable @@ -59,7 +61,7 @@ class StreetViewActivity : ComponentActivity() { @OptIn(MapsExperimentalFeature::class) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { var isPanningEnabled by remember { mutableStateOf(false) } var isZoomEnabled by remember { mutableStateOf(false) } @@ -86,7 +88,11 @@ class StreetViewActivity : ComponentActivity() { fetchStreetViewData(singapore, BuildConfig.MAPS_API_KEY) } } - Box(Modifier.fillMaxSize(), Alignment.BottomStart) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + contentAlignment = Alignment.BottomStart, + ) { if (streetViewResult == Status.OK) { StreetView( Modifier.matchParentSize(), diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt index e32b08a18..a78ee674e 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt @@ -22,8 +22,10 @@ import android.util.Log import android.widget.TextView import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -57,6 +59,7 @@ class AdvancedMarkersActivity : ComponentActivity(), OnMapsSdkInitializedCallbac override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) MapsInitializer.initialize(applicationContext, MapsInitializer.Renderer.LATEST, this) + enableEdgeToEdge() setContent { // Observing and controlling the camera's state can be done with a CameraPositionState val cameraPositionState = rememberCameraPositionState { @@ -78,7 +81,10 @@ class AdvancedMarkersActivity : ComponentActivity(), OnMapsSdkInitializedCallbac } false } - Box(Modifier.fillMaxSize()) { + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding(), + ) { GoogleMap( modifier = Modifier.matchParentSize(), googleMapOptionsFactory = { diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt index 8301b0066..77ff5cce6 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.ScrollState import androidx.compose.foundation.horizontalScroll @@ -14,6 +15,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.Button import androidx.compose.material.ButtonDefaults @@ -57,6 +59,7 @@ private val TAG = MarkerClusteringActivity::class.simpleName class MarkerClusteringActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { GoogleMapClustering() } @@ -75,7 +78,12 @@ fun GoogleMapClustering() { items.add(MyItem(position, "Marker", "Snippet", 0f)) } } - GoogleMapClustering(items = items) + Box( + modifier = Modifier.fillMaxSize() + .systemBarsPadding() + ) { + GoogleMapClustering(items = items) + } } @Composable diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/draggablemarkerscollectionwithpolygon/DraggableMarkersCollectionWithPolygonActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/draggablemarkerscollectionwithpolygon/DraggableMarkersCollectionWithPolygonActivity.kt index 8bea519cc..0faede4bf 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/draggablemarkerscollectionwithpolygon/DraggableMarkersCollectionWithPolygonActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/draggablemarkerscollectionwithpolygon/DraggableMarkersCollectionWithPolygonActivity.kt @@ -17,7 +17,9 @@ package com.google.maps.android.compose.markerexamples.draggablemarkerscollectio import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable @@ -125,12 +127,13 @@ class DraggableMarkersCollectionWithPolygonActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { MapsComposeSampleTheme { GoogleMapWithLocations( markersModel, modifier = Modifier.fillMaxSize() + .systemBarsPadding(), ) } } diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/markerdragevents/MarkerDragEventsActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/markerdragevents/MarkerDragEventsActivity.kt index 5862ce600..75dcc7993 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/markerdragevents/MarkerDragEventsActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/markerdragevents/MarkerDragEventsActivity.kt @@ -18,7 +18,9 @@ import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.snapshotFlow @@ -42,11 +44,12 @@ private val TAG = MarkerDragEventsActivity::class.simpleName class MarkerDragEventsActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { MapsComposeSampleTheme { GoogleMapWithMarker( modifier = Modifier.fillMaxSize() + .systemBarsPadding(), ) } } diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/markerscollection/MarkersCollectionActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/markerscollection/MarkersCollectionActivity.kt index dacb43aca..c9293a808 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/markerscollection/MarkersCollectionActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/markerscollection/MarkersCollectionActivity.kt @@ -17,7 +17,9 @@ package com.google.maps.android.compose.markerexamples.markerscollection import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.runtime.key @@ -75,12 +77,13 @@ class MarkersCollectionActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { MapsComposeSampleTheme { Screen( dataModel = dataModel, modifier = Modifier.fillMaxSize() + .systemBarsPadding(), ) } } diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/syncingdraggablemarkerwithdatamodel/SyncingDraggableMarkerWithDataModelActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/syncingdraggablemarkerwithdatamodel/SyncingDraggableMarkerWithDataModelActivity.kt index 1aa48ae91..23b16aaf2 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/syncingdraggablemarkerwithdatamodel/SyncingDraggableMarkerWithDataModelActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/syncingdraggablemarkerwithdatamodel/SyncingDraggableMarkerWithDataModelActivity.kt @@ -17,7 +17,9 @@ package com.google.maps.android.compose.markerexamples.syncingdraggablemarkerwit import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.runtime.LaunchedEffect @@ -71,12 +73,13 @@ class SyncingDraggableMarkerWithDataModelActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() setContent { MapsComposeSampleTheme { Screen( dataModel = dataModel, modifier = Modifier.fillMaxSize() + .systemBarsPadding(), ) } } diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/updatingnodragmarkerwithdatamodel/UpdatingNoDragMarkerWithDataModelActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/updatingnodragmarkerwithdatamodel/UpdatingNoDragMarkerWithDataModelActivity.kt index ecd58208f..28fd66f88 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/updatingnodragmarkerwithdatamodel/UpdatingNoDragMarkerWithDataModelActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/updatingnodragmarkerwithdatamodel/UpdatingNoDragMarkerWithDataModelActivity.kt @@ -17,7 +17,9 @@ package com.google.maps.android.compose.markerexamples.updatingnodragmarkerwithd import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.runtime.getValue @@ -71,7 +73,7 @@ class UpdatingNoDragMarkerWithDataModelActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - + enableEdgeToEdge() lifecycleScope.launch { // Simulate remote updates to data model while (true) { @@ -93,6 +95,7 @@ class UpdatingNoDragMarkerWithDataModelActivity : ComponentActivity() { GoogleMapWithSimpleMarker( locationData = dataModel.locationData, modifier = Modifier.fillMaxSize() + .systemBarsPadding(), ) } }