FloatingPaneView

class FloatingPaneView @JvmOverloads constructor(context: Context, val parentView: FloatingPaneLayout, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout, NestedScrollingParent3

Represents a floating pane view in Samsung One UI that can be displayed in different docking modes (Bottom, Side, Floating) and can be minimized. Handles touch gestures for drag-moving, edge-resizing, mode changes, and haptic feedback.

Parameters

context

The context in which the view is created.

parentView

The parent layout that contains this floating pane view.

attrs

The attributes of the XML tag that is inflating the view.

defStyleAttr

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Whether dragging the pane's top edge via content scrolling resizes the pane in bottom mode.

Functions

Link copied to clipboard

Adds a callback to be notified of floating pane events.

Link copied to clipboard
fun changePaneLayoutMode(requestMode: FloatingPane.FloatingPaneMode, invalidate: Boolean, isLongPress: Boolean, skipAnimate: Boolean, fromUser: Boolean = false)

Changes the pane's layout mode (floating / bottom / side).

Link copied to clipboard
fun enterMinimizeView(minimize: Boolean)

Enters or exits the minimize view.

Link copied to clipboard

Returns the top limit size, typically the height reserved for the status bar.

Link copied to clipboard
fun hide(animate: Boolean)

Hides the floating pane, optionally with the hide animation of the current mode.

Link copied to clipboard

Checks if the floating pane view is currently in a minimized state.

Link copied to clipboard

Returns whether the floating pane is currently visible.

Link copied to clipboard
open override fun onNestedFling(target: View, velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
Link copied to clipboard
open override fun onNestedPreFling(target: View, velocityX: Float, velocityY: Float): Boolean
Link copied to clipboard
open override fun onNestedPreScroll(target: View, dx: Int, dy: Int, consumed: IntArray, type: Int)
Link copied to clipboard
open override fun onNestedScroll(target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int)
open override fun onNestedScroll(target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int, consumed: IntArray)
Link copied to clipboard
open override fun onNestedScrollAccepted(child: View, target: View, axes: Int, type: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onStartNestedScroll(child: View, target: View, axes: Int, type: Int): Boolean
Link copied to clipboard
open override fun onStopNestedScroll(target: View, type: Int)
Link copied to clipboard
open override fun onTouchEvent(event: MotionEvent): Boolean
Link copied to clipboard

Removes all registered callbacks.

Link copied to clipboard

Removes a callback that was previously added.

Link copied to clipboard
fun setHaveAnotherMinimizeView(haveAnotherMinimizedView: Boolean)

Sets whether another minimize view exists. This is used to determine if alpha animations should be played when minimizing or un-minimizing.

Link copied to clipboard

Sets the bottom inset used when the pane is minimized in bottom mode.

Link copied to clipboard

Sets the height of the floating pane for a specific mode.

Link copied to clipboard

Sets the background resource for the result view in a specific mode.

Link copied to clipboard

Sets the width for a specific mode of the floating pane.

Link copied to clipboard
fun setTopLimitSize(newTopLimitSize: Int)

Sets the top limit size for the floating pane view. This method is used when the view is in certain modes like 'Bottom' or 'Side' to restrict how far up it can be moved or resized.

Link copied to clipboard
fun show(animate: Boolean)

Shows the floating pane, optionally with the show animation of the current mode.