Class DynamicBottomSheetBehavior<V extends View>
java.lang.Object
androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior<V>
com.google.android.material.bottomsheet.BottomSheetBehavior<V>
com.pranavpandey.android.dynamic.support.behavior.DynamicBottomSheetBehavior<V>
- Type Parameters:
V- The type of the view attached to this behavior.
- All Implemented Interfaces:
MaterialBackHandler
A
BottomSheetBehavior behavior to automatically hide it according to the nested scroll.
Set this behavior in the layout file having CoordinatorLayout as root element to hide
the bottom sheet according to the scroll direction.
Scrolling in downwards direction will hide the bottom sheet.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.android.material.bottomsheet.BottomSheetBehavior
BottomSheetBehavior.BottomSheetCallback, BottomSheetBehavior.SavedState, BottomSheetBehavior.SaveFlags, BottomSheetBehavior.StableState, BottomSheetBehavior.State -
Field Summary
Fields inherited from class com.google.android.material.bottomsheet.BottomSheetBehavior
PEEK_HEIGHT_AUTO, SAVE_ALL, SAVE_FIT_TO_CONTENTS, SAVE_HIDEABLE, SAVE_NONE, SAVE_PEEK_HEIGHT, SAVE_SKIP_COLLAPSED, STATE_COLLAPSED, STATE_DRAGGING, STATE_EXPANDED, STATE_HALF_EXPANDED, STATE_HIDDEN, STATE_SETTLING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlayoutDependsOn(CoordinatorLayout parent, V child, View dependency) booleanonLayoutChild(CoordinatorLayout parent, V child, int layoutDirection) voidonNestedScroll(CoordinatorLayout coordinatorLayout, V child, View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type, int[] consumed) booleanonStartNestedScroll(CoordinatorLayout coordinatorLayout, V child, View directTargetChild, View target, int nestedScrollAxes, int type) Methods inherited from class com.google.android.material.bottomsheet.BottomSheetBehavior
addBottomSheetCallback, calculateSlideOffset, cancelBackProgress, disableShapeAnimations, from, getExpandedOffset, getHalfExpandedRatio, getHideFriction, getLastStableState, getMaxHeight, getMaxWidth, getPeekHeight, getSaveFlags, getSignificantVelocityThreshold, getSkipCollapsed, getState, handleBackInvoked, isDraggable, isFitToContents, isGestureInsetBottomIgnored, isHideable, isHideableWhenDragging, isNestedScrollingCheckEnabled, isShouldRemoveExpandedCorners, onAttachedToLayoutParams, onDetachedFromLayoutParams, onInterceptTouchEvent, onMeasureChild, onNestedPreFling, onNestedPreScroll, onRestoreInstanceState, onSaveInstanceState, onStopNestedScroll, onTouchEvent, removeBottomSheetCallback, setBottomSheetCallback, setDraggable, setExpandedOffset, setFitToContents, setGestureInsetBottomIgnored, setHalfExpandedRatio, setHideable, setHideableInternal, setHideFriction, setMaxHeight, setMaxWidth, setPeekHeight, setPeekHeight, setSaveFlags, setShouldRemoveExpandedCorners, setSignificantVelocityThreshold, setSkipCollapsed, setState, setUpdateImportantForAccessibilityOnSiblings, shouldExpandOnUpwardDrag, shouldSkipHalfExpandedStateWhenDragging, shouldSkipSmoothAnimation, startBackProgress, updateBackProgressMethods inherited from class androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior
blocksInteractionBelow, getInsetDodgeRect, getScrimColor, getScrimOpacity, getTag, onApplyWindowInsets, onDependentViewChanged, onDependentViewRemoved, onNestedFling, onNestedPreScroll, onNestedScroll, onNestedScroll, onNestedScrollAccepted, onNestedScrollAccepted, onRequestChildRectangleOnScreen, onStartNestedScroll, onStopNestedScroll, setTag
-
Constructor Details
-
DynamicBottomSheetBehavior
-
-
Method Details
-
onLayoutChild
public boolean onLayoutChild(@NonNull CoordinatorLayout parent, @NonNull V child, int layoutDirection) - Overrides:
onLayoutChildin classBottomSheetBehavior<V extends View>
-
layoutDependsOn
public boolean layoutDependsOn(@NonNull CoordinatorLayout parent, @NonNull V child, @NonNull View dependency) - Overrides:
layoutDependsOnin classCoordinatorLayout.Behavior<V extends View>
-
onStartNestedScroll
public boolean onStartNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull V child, @NonNull View directTargetChild, @NonNull View target, int nestedScrollAxes, int type) - Overrides:
onStartNestedScrollin classBottomSheetBehavior<V extends View>
-
onNestedScroll
public void onNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull V child, @NonNull View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type, @NonNull int[] consumed) - Overrides:
onNestedScrollin classBottomSheetBehavior<V extends View>
-