Simen Sogard
02/06/2024, 11:19 AMJoel Denke
02/06/2024, 11:26 AMJoel Denke
02/06/2024, 11:27 AMJoel Denke
02/06/2024, 11:29 AMJoel Denke
02/06/2024, 11:30 AMColumn(Modifier.fillMaxWidth()) {
if (dragHandle != null) {
val collapseActionLabel =
getString(Strings.BottomSheetPartialExpandDescription)
val dismissActionLabel = getString(Strings.BottomSheetDismissDescription)
val expandActionLabel = getString(Strings.BottomSheetExpandDescription)
Box(
Modifier
.align(Alignment.CenterHorizontally)
.semantics(mergeDescendants = true) {
// Provides semantics to interact with the bottomsheet based on its
// current value.
with(sheetState) {
dismiss(dismissActionLabel) {
animateToDismiss()
true
}
if (currentValue == PartiallyExpanded) {
expand(expandActionLabel) {
if (anchoredDraggableState.confirmValueChange(
Expanded
)
) {
scope.launch { sheetState.expand() }
}
true
}
} else if (hasPartiallyExpandedState) {
collapse(collapseActionLabel) {
if (anchoredDraggableState.confirmValueChange(
PartiallyExpanded
)
) {
scope.launch { partialExpand() }
}
true
}
}
}
}
) {
dragHandle()
}
}
content()
}
If you set dragHandle = {} in ModalBottomSheet(dragHandle = {}) I think you will be able to draw your content as you wish 🙂Simen Sogard
02/06/2024, 11:40 AMJoel Denke
02/06/2024, 11:49 AMJoel Denke
02/06/2024, 11:50 AMRow {
LeftIconButton(Modifier.weight(1f))
BottomSheetDefaults.DragHandle()
RightIconButton(Modifier.weight(1f))
}