Hide View On Scroll Behavior
The Behavior for a View within a CoordinatorLayout to hide the view off of the edge of the screen when scrolling down, and show it when scrolling up.
Supports hiding the View off of three screen edges: EDGE_RIGHT, EDGE_BOTTOM, and EDGE_LEFT.
If Touch Exploration is enabled, the hide on scroll behavior should be disabled until Touch Exploration is disabled. Ensure that the content is not obscured due to disabling this behavior by adding padding to the content.
Types
Link copied to clipboard
interface OnScrollStateChangedListener
Interface definition for a listener to be notified when the bottom view scroll state changes.
Link copied to clipboard
Positions the scroll state can be set to.
Properties
Functions
Link copied to clipboard
open fun addOnScrollStateChangedListener(@NonNull listener: HideViewOnScrollBehavior.OnScrollStateChangedListener)
Adds a listener to be notified of View scroll state changes.
Link copied to clipboard
Remove all previously added OnScrollStateChangedListeners.
Link copied to clipboard
Sets whether or not to disable this behavior if touch exploration is enabled.
Link copied to clipboard
A utility function to get the HideViewOnScrollBehavior associated with the
view.Link copied to clipboard
Returns whether or not this behavior is disabled if touch exploration is enabled.
Link copied to clipboard
Returns true if the current state is scrolled in.
Link copied to clipboard
Returns true if the current state is scrolled out.
Link copied to clipboard
open fun onLayoutChild(@NonNull parent: CoordinatorLayout, @NonNull child: V, layoutDirection: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun removeOnScrollStateChangedListener(@NonNull listener: HideViewOnScrollBehavior.OnScrollStateChangedListener)
Removes a previously added listener.
Link copied to clipboard
Sets an additional offset used to hide the view.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard