Justin Yue
12/27/2021, 10:48 PMLazyColumn(
state = scrollState,
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
) {
item {
Map(
zoneViewModel.lat,
zoneViewModel.lon,
focusRequester,
isScrollingEnabled
) {
isScrollingEnabled = !isScrollingEnabled
if (isScrollingEnabled) {
scrollState.reenableScrolling(scope)
}
else {
scrollState.disableScrolling(scope)
focusRequester.requestFocus()
}
}
}
class CustomMapView(
context: Context
): MapView(context) {
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
parent.requestDisallowInterceptTouchEvent(true)
return super.dispatchTouchEvent(ev)
}
}