答案 0 :(得分:0)
您可以在听BottomSheetBehavior
的同时尝试对BottomSheet布局进行一些更改:
BottomSheetBehavior behavior = BottomSheetBehavior.from(mBottomSheetBehavior);
behavior.setBottomSheetCallback(new BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
// Here you can implement your logic with layour change
}
@Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
// Here you can implement your logic with layour change
}
});