FloatingTopBehavior

CoordinatorLayout behavior for top-aligned floating layouts that listens to AppBarLayout state changes.

Parameters

T

The type of FloatingTopLayout.

context

The Context the behavior is running in.

attrs

The attributes of the XML tag inflating the behavior.

Inheritors

Constructors

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

Properties

Link copied to clipboard

Reference to the attached AppBarLayout.

Link copied to clipboard

Flag indicating whether the behavior is executing its initial layout pass for the child view.

Link copied to clipboard
open override val logTag: String

Functions

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

Callback invoked when AppBarLayout state changes.

Link copied to clipboard

Configures default layout parameters and gravity when attached to CoordinatorLayout layout params.

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

Positions the child view relative to its dependent AppBarLayout during layout pass.