FloatingTopLayout

open class FloatingTopLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FloatingGroupLayout

Top-aligned floating layout container positioned relative to an AppBarLayout.

Automatically manages available top scroll bounds and background projection alpha transitions based on app bar scroll/collapse states.

Parameters

context

The Context the view is running in.

attrs

The attributes of the XML tag inflating the view.

defStyleAttr

Default style attribute for styling.

Inheritors

Constructors

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

Types

Link copied to clipboard
object Companion
Link copied to clipboard

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

Properties

Link copied to clipboard

Controls whether item projection background alpha transition animation is enabled.

Link copied to clipboard
open override val logTag: String

Functions

Link copied to clipboard

Applies this layout's measured height to the available scroll top boundary.

Link copied to clipboard
open override fun applyScrollableViewOptions()

Configures scrollable view options and updates available top boundaries when a scrollable is attached.

Link copied to clipboard
fun applyScrollAvailBounds(top: Int = UNSPECIFIED_BOUND, bottom: Int = UNSPECIFIED_BOUND, tag: String = javaClass.simpleName, dispatchFakeScroll: Boolean = true)

Updates top and bottom scroll available bounds via FloatingScrollableManager.

Link copied to clipboard

Enables or disables alpha transition animation for toolbar item projection backgrounds.

Link copied to clipboard
open override fun getBehavior(): CoordinatorLayout.Behavior<*>

Returns the default FloatingTopBehavior for layout positioning and app bar coordination.

Link copied to clipboard

Returns whether item background transition animations are currently enabled.

Link copied to clipboard
open override fun needInvalidateBlurViews(): Boolean

Determines whether background blur views need to be invalidated based on layout and projection alpha.

fun startProjectionViewAlphaAnimationInternal(show: Boolean, animate: Boolean = true, force: Boolean = false)

Animates projection view item alpha internally based on target visibility and transition config.