【发布时间】:2019-08-10 10:36:30
【问题描述】:
我正在使用BottomSheetDialogFragment,我需要知道状态何时发生变化。
例如有BottomSheetBehavior的状态
PEEK_HEIGHT_AUTO - Peek at the 16:9 ratio keyline of its parent.
STATE_COLLAPSED - The bottom sheet is collapsed.
STATE_DRAGGING - The bottom sheet is dragging.
STATE_EXPANDED - The bottom sheet is expanded.
STATE_HIDDEN - The bottom sheet is hidden.
STATE_SETTLING - The bottom sheet is settling.
我想根据当前状态更改一些视图 - 例如,当BottomSheetDialogFragment 将全屏展开时,我想在右上角显示十字图标以关闭它等。
我怎样才能听到这种事件?
【问题讨论】:
标签: android android-layout android-fragments material-design bottom-sheet