ResponsiveDrawerResizeStrategy

Resizes a drawer identified by responsive_pane_drawer using spring animations.

Uses resource-backed opened and closed configurations and permits drag resizing. Child lookups are cached until cleanup. Call initPaneConfig before using preset widths.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val logTag: String

Tag used for resize strategy log messages.

Functions

Link copied to clipboard
open override fun animateOverWidthToOpened(layout: ResponsivePaneLayout, callback: ResponsivePaneSlideOffsetCallback?, onAnimationEnd: () -> Unit)

Snaps an oversize drawer in layout back to its opened width.

Link copied to clipboard
open override fun animateStateTransition(layout: ResponsivePaneLayout, toState: PaneState, skipAnimation: Boolean, callback: ResponsivePaneSlideOffsetCallback?, onAnimationEnd: () -> Unit)

Moves the drawer in layout to toState.

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

Returns this strategy's default policy for interaction outside the drawer.

Link copied to clipboard
open override fun cleanup()

Cancels animations and clears cached child views, retaining configurations.

Link copied to clipboard

Returns and caches the container with ID responsive_pane_content inside layout.

Link copied to clipboard
open override fun getDragRange(layout: ConstraintLayout): Int

Returns the signed width range for layout.

Link copied to clipboard
open override fun getDrawerLayout(layout: ViewGroup): ViewGroup?

Returns the drawer managed within layout, or null when none is found.

Link copied to clipboard
open override fun getDrawerPaneWidth(layout: ConstraintLayout, state: PaneState): Int

Returns the target drawer width in pixels for state within layout.

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

Returns the configuration for paneState, or an unresolved default if not initialized.

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

Returns the settled pane state maintained by this strategy.

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

Initializes state configurations from resources resolved using context.

Link copied to clipboard
open override fun onPaneDragged(parent: ResponsivePaneLayout, offset: Float, callback: ResponsivePaneSlideOffsetCallback?)

Resizes the drawer within parent by a drag delta.

Link copied to clipboard
open override fun setPaneConfig(paneState: PaneState, responsiveConfig: ResponsiveConfig)

Stores responsiveConfig for paneState without directly requesting a layout.

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

Returns whether gesture-driven resizing is allowed.

Link copied to clipboard
open override fun updateConstraintConnect(parent: ConstraintLayout)

Applies responsive drawer constraints to parent for the current state.