I have this below composable. when I scroll the lazycolumn, the bottomsheet closes. how to fix this? I have attached the video of the same issue below.
Код: Выделить всё
val navController = rememberNavController()
val sheetState = rememberModalBottomSheetState(
initialValue = ModalBottomSheetValue.Hidden,
skipHalfExpanded = true,
confirmValueChange = { it ->
Log.d("HomePageActivity", "SheetStateInside is $it")
false
},
)
val bottomSheetNavigator = remember { BottomSheetNavigator(sheetState) }
navController.navigatorProvider += bottomSheetNavigator
AppTheme {
ModalBottomSheetLayout(
bottomSheetNavigator = bottomSheetNavigator,
sheetShape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp),
sheetBackgroundColor = neutral5,
) {
DestinationsNavHost(
navController = navController,
navGraph = NavGraphs.root,
startRoute = AppChooserBottomSheetDestination,
engine = rememberAnimatedNavHostEngine(),
)
}
}
Источник: https://stackoverflow.com/questions/781 ... roll-issue