FloatingToolbarBehavior

CoordinatorLayout Behavior for FloatingToolbarLayout managing scroll events and title alpha transitions.

Parameters

T
context

The Context the behavior is running in.

attrs

The attributes of the XML tag inflating the behavior.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null)

Functions

Link copied to clipboard
open override fun onAppBarStateChanged(oldState: Int, newState: Int, child: T)

Reacts to app bar state changes to animate title alpha and set eating touch state on toolbar.

Link copied to clipboard
open override fun onLayoutChild(parent: CoordinatorLayout, child: T, layoutDirection: Int): Boolean

Handles layout positioning and initial app bar state synchronization.

Link copied to clipboard
open override fun onStartNestedScroll(coordinatorLayout: CoordinatorLayout, child: T, directTargetChild: View, target: View, axes: Int, type: Int): Boolean

Evaluates scroll conditions and returns false to prevent direct nested scroll interception.