FloatingGroupLayout

Base layout container for Samsung OneUI floating components.

Provides smooth show/hide transitions, scroll integration with SeslScrollable views, background projection rendering, and blur support.

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 FloatingGroupLayout reacting to AppBarLayout changes.

Link copied to clipboard
open class FloatingGroupAware @JvmOverloads constructor(floatingGroupLayout: FloatingGroupLayout? = null) : FloatingAware

Default FloatingAware implementation for FloatingGroupLayout.

Link copied to clipboard

Listener interface for observing layout alpha animation events.

Link copied to clipboard
data class ReferViewInformation(val left: Int = 0, val right: Int = 0, val height: Int = 0, val locationScreenX: Int = 0, val locationScreenY: Int = 0)

Information about reference view location and size on screen.

Link copied to clipboard

Container view that hosts projection background items for items inside floating toolbars.

Properties

Link copied to clipboard

true to apply blur effects to item projection background shapes.

Link copied to clipboard

true to block pre-draw blur invalidations during hidden or detached states.

Link copied to clipboard

Custom elevation padding rectangle applied to this container.

Link copied to clipboard

true to allow show/hide transitions triggered by content scrolling.

Link copied to clipboard

true to enable hardware-accelerated canvas blur on target views.

Link copied to clipboard

FloatingAnimationConfig defining animation durations and interpolators.

Link copied to clipboard

Custom FloatingAware implementation providing reference views and bounds insets for item projection. Ensure that the relevant reference views are already visible when invoking this.

Link copied to clipboard
open override val logTag: String
Link copied to clipboard

Custom override setting whether fading edge bottom offset is managed automatically.

Link copied to clipboard

Custom override setting whether GoToTop button offset is managed automatically.

Link copied to clipboard

Pre-draw listener used to invalidate registered blur target views when position changes.

Link copied to clipboard

The inner SeslProjectionView hosting projection background shapes.

Link copied to clipboard

true to animate item projection backgrounds into view on initial layout.

Link copied to clipboard

true to skip layout and projection background animations.

Link copied to clipboard

Current target alpha value for layout visibility animations.

Link copied to clipboard

Bottom window inset pixel value passed down to FloatingScrollableManager. for adjusting bottom boundary for scrollbars, hover scroller and goToTop button.

Link copied to clipboard

true if this floating layout coordinates with an AppBarLayout.

Functions

Link copied to clipboard

Adds views to be invalidated when blur region updates.

fun addBlurInvalidateTargetViews(view: View, bounds: Rect? = null)

Adds a view to be invalidated when blur region updates.

Link copied to clipboard

Adds an animator listener for projection background matching animations.

Link copied to clipboard
open override fun addView(child: View?, index: Int, params: ViewGroup.LayoutParams?)

Intercepts child view addition to ensure projection view is placed at index 0.

Animates elevation and blur curve for floating background shapes.

Link copied to clipboard
open override fun applyBlurInfo(context: Context): Boolean

Applies background blur info across registered blur target views.

Link copied to clipboard

Called to apply layout options to the managed scrollable view, namely:

Link copied to clipboard

Evaluates scroll delta and triggers show or hide transitions accordingly.

Link copied to clipboard

Checks dependency on AppBarLayout and updates withAppBarLayout.

Link copied to clipboard
open override fun clearBlurInfo(context: Context)

Clears background blur info across registered blur target views.

Link copied to clipboard

Clears all registered blur target views.

Link copied to clipboard

Clears the attached scrollable view from the manager.

Link copied to clipboard

Clears all registered FloatingLayoutStateChangeListener instances.

Link copied to clipboard

Unregisters the attached NestedScrollView.

Link copied to clipboard

Unregisters the attached RecyclerView.

Link copied to clipboard

Unregisters the attached scrollable content view.

Link copied to clipboard

Disables dynamic GoToTop offset adjustments.

Link copied to clipboard

Configures whether automatic fading edge bottom offset is enabled. This is enabled by default.

Link copied to clipboard

Enables dynamic GoToTop offset adjustments. This is disabled by default.

Link copied to clipboard
fun enableScrollTransition(enable: Boolean, show: Boolean = true)

Configures whether scroll transitions are enabled.

Link copied to clipboard

Sends callbacks to FloatingAware for starting show or hide transitions.

Link copied to clipboard

Finds the attached AppBarLayout from parent CoordinatorLayout.

Finds the AppBarLayout among dependency views in a CoordinatorLayout.

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

Returns the CoordinatorLayout behavior for this floating container.

Link copied to clipboard

Active FloatingScrollableManager coordinating scroll events and bounds.

Link copied to clipboard

Returns active registered NestedScrollView or null.

Link copied to clipboard

Returns active registered RecyclerView or null.

Link copied to clipboard

Returns the current visible state of this layout.

Link copied to clipboard

Invalidates all target views that depend on background blur recalculation.

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

Returns true if blur is currently applied to any registered blur target view.

Link copied to clipboard

Returns true if floating item background is visible (alpha == 1.0).

Link copied to clipboard

Returns true if this layout container is visible (alpha == 1.0).

Link copied to clipboard

Returns whether target blur views need invalidation.

Link copied to clipboard
open fun onAppBarOffsetChanged(appBarLayout: AppBarLayout, verticalOffset: Int)

Called when the attached AppBarLayout offset changes.

Link copied to clipboard
open override fun onInterceptTouchEvent(ev: MotionEvent): Boolean

Intercepts touch events when layout is not fully visible.

Link copied to clipboard

Removes a blur target view from invalidation tracking.

Removes blur target views from invalidation tracking.

Link copied to clipboard

Resets accumulated scroll distance used for hide transition triggers.

Link copied to clipboard
open override fun setBlurMode(semBlurInfoMode: Int)

Sets blur mode across registered blur target views.

Link copied to clipboard

Sets the background color for all floating projection items.

Link copied to clipboard

Sets elevation for floating background projection shapes.

Link copied to clipboard

Sets corner radius for floating background projection shapes.

Link copied to clipboard

Sets the scrollable adapter for interacting with scrollable content views.

Link copied to clipboard
fun setLayoutVisibility(show: Boolean, animation: Boolean = true, force: Boolean = false)

Sets the visibility state of the floating layout.

Link copied to clipboard
fun setNestedScrollView(nestedScrollView: NestedScrollView)

Attaches a NestedScrollView to this floating layout container.

Link copied to clipboard

Calculates and applies elevation padding.

Link copied to clipboard
fun setRecyclerView(recyclerView: RecyclerView)

Attaches a RecyclerView to this floating layout container.

Link copied to clipboard

Sets tint color for all floating background projection shapes.

Link copied to clipboard

Sets the bottom window inset pixel value for adjusting bottom boundary for scrollbars, hover scroller and goToTop button. Requires manageGoToTopOffset to be enabled.

Link copied to clipboard
fun showFloatingItemBackground(show: Boolean, animate: Boolean = true)

Shows or hides floating item projection backgrounds.

Link copied to clipboard

Starts item projection background matching animation.

Link copied to clipboard

Starts the delayed post-show runnable.

Link copied to clipboard
fun startSpringScaleAnimation(oldValue: Float, newValue: Float)

Starts a spring scale animation on the floating container and its reference views.

Link copied to clipboard
fun startSpringScaleAnimationInternal(oldValue: Float, newValue: Float, targetViews: List<View>)

Internal implementation of spring scale animation using SpringAnimation.

Link copied to clipboard
open fun startViewAlphaAnimation(show: Boolean, immediately: Boolean = false, force: Boolean = false, dispatchedByScroll: Boolean = false, dispatchedByVisibilityChange: Boolean = false)

Starts the alpha transition animation to show or hide the view.

Link copied to clipboard

Cancels the delayed post-show runnable.