ResponsivePaneControllerImpl

Default controller using ResponsiveDrawerResizeStrategy for width-based drawer transitions.

Call initialize before forwarding gesture or layout callbacks. Use the owning layout's public APIs for normal state, configuration, and outside-touch changes.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Internal gesture thresholds used by the default controller.

Properties

Link copied to clipboard

Strategy used for subsequent layout, drag, and state operations.

Link copied to clipboard

Current settled state read directly from currentBehaviorStrategy.

Link copied to clipboard

Whether the most recent intercepted touch-down was within the drawer.

Link copied to clipboard
open override var isOutsideTouchEnabled: Boolean

Whether content outside an opened drawer may receive interaction.

Link copied to clipboard
open override val logTag: String

Tag used for controller log messages.

Link copied to clipboard

Listener for width changes, receiving a nullable drawer and normalized slide progress.

Link copied to clipboard
open override var onStateChangedListener: (ViewGroup?, PaneState) -> Unit?

Listener for transition-end notifications. The drawer argument may be null if unavailable.

Link copied to clipboard
var prev: Int

Drawer width in pixels captured at the latest touch-down, or -1 before any capture.

Link copied to clipboard

Cached visual interpolation concept; refreshed by getElevationConcept when configurations change.

Link copied to clipboard

Layout associated by initialize; accessing it before initialization throws.

Functions

Link copied to clipboard
fun animateStateTransition(view: ViewGroup, toState: PaneState, skipAnimation: Boolean)

Transitions view to toState, forwarding slide and transition-end notifications.

Link copied to clipboard
open override fun cleanup()

Cancels strategy animations and clears cached views and elevation effects.

Link copied to clipboard
open override fun computeScroll(viewGroup: ViewGroup)

Advances gesture settling for viewGroup and schedules further frames when needed.

Link copied to clipboard
open override fun getCurrentPaneState(): PaneState

Returns the strategy's current settled pane state.

Link copied to clipboard

Returns or regenerates the visual interpolation concept from both state configurations.

Link copied to clipboard
open override fun getPaneConfig(paneState: PaneState): ResponsiveConfig

Returns the visual and width configuration for paneState.

Link copied to clipboard
open override fun initialize(responsivePaneLayout: ResponsivePaneLayout)

Associates this controller with responsivePaneLayout and initializes gestures and presets.

Link copied to clipboard
open override fun onConfigurationChanged(responsivePaneLayout: ResponsivePaneLayout, newConfig: Configuration)

Updates the associated responsivePaneLayout for newConfig.

Link copied to clipboard
open override fun onInterceptTouchEvent(viewGroup: ViewGroup, ev: MotionEvent): Boolean?

Evaluates interception of ev within viewGroup.

Link copied to clipboard
open override fun onLayout(viewGroup: ViewGroup, changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)

Updates gesture tracking after viewGroup is laid out.

Link copied to clipboard
fun onPaneDragged(slideOffset: Float)

Resizes the associated drawer by slideOffset pixels.

Link copied to clipboard
open override fun onTouchEvent(viewGroup: ViewGroup, event: MotionEvent): Boolean?

Processes event within viewGroup.

Link copied to clipboard
open override fun setOutsideTouchEnabled(enabled: Boolean)

Sets the controller's outside-touch policy to enabled.

Link copied to clipboard
open override fun setPaneConfig(viewGroup: ResponsivePaneLayout, paneState: PaneState, responsiveConfig: ResponsiveConfig)
Link copied to clipboard
open override fun setPaneState(viewGroup: ViewGroup, state: PaneState, animate: Boolean)

Requests state for viewGroup.

Link copied to clipboard

Reapplies the current strategy's constraints to view.