android-maps-compose
android-maps-compose copied to clipboard
When using TalkBack, markers inside the BottomSheetScaffold content steal focus even when the sheet content is covering the map.
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
- com.google.maps.android:maps-compose:5.0.3
- Any Android API
Steps to reproduce
- Setup
BottomSheetScaffold
- Add a map with markers as
content
- Add any composable as
sheetContent
- Enable talkback
- Markers can be focused event when the
sheetContent
is covering the map
Code example
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ScaffoldMap() {
BottomSheetScaffold(
sheetContent = { SheetContent() }
) { padding ->
MapContent(padding)
}
}
@Composable
fun MapContent(padding: PaddingValues) {
val singapore = LatLng(1.35, 103.87)
val cameraPositionState = rememberCameraPositionState {
position = CameraPosition.fromLatLngZoom(singapore, 12f)
}
GoogleMap(
modifier = Modifier.fillMaxSize().padding(padding),
cameraPositionState = cameraPositionState
) {
for (i in 1..50) {
Marker(
state = rememberMarkerState(position = LatLng(1.35 + i * 0.001, 103.87 + i * 0.001)),
title = "Marker $i"
)
}
}
}
@Composable
fun SheetContent() {
LazyColumn {
items(100) { index ->
Button(
onClick = { },
modifier = Modifier
.fillMaxWidth()
.padding(8.dp)
) {
Text(text = "Button $index")
}
}
}
}
Video
https://github.com/user-attachments/assets/5bfc32b5-9465-45b8-9cb3-b7b2a1888b59