我尝试使用子计算布局,并通过从可见的床单高度减去按钮高度来放置按钮;
constraints.maxHeight - sheetState.offset.value - ctaPlaceable.height
但是,当板从倒塌到被解雇时,我无法实现所需的过渡,因为该按钮保持固定在其位置上。我希望当纸张被拆除时,当纸张滑动时将按钮滑下并保持在其位置。 有人可以帮助吗?
我不知道您是否仍然面临问题,但是您可以添加 coreceatLeast(0f),它的页脚在床单上滑动 and you could find it here:https://github.com/MahmoudElsayedEssa/BottomSheetPinnedFooter/blob/main/app/src/main/java/com/example/bottomsheetpinnedfooter/BottomSheetWithPinnedFooterLinkedLike.kt