Google is committed to advancing racial equity for Black communities. See how.

ViewParentCompat

class ViewParentCompat
kotlin.Any
   ↳ androidx.core.view.ViewParentCompat

Helper for accessing features in ViewParent.

Summary

Public methods
static Unit
notifySubtreeAccessibilityStateChanged(parent: ViewParent!, child: View!, source: View!, changeType: Int)

Notifies a view parent that the accessibility state of one of its descendants has changed and that the structure of the subtree is different.

static Boolean
onNestedFling(parent: ViewParent!, target: View!, velocityX: Float, velocityY: Float, consumed: Boolean)

Request a fling from a nested scroll.

static Boolean
onNestedPreFling(parent: ViewParent!, target: View!, velocityX: Float, velocityY: Float)

React to a nested fling before the target view consumes it.

static Unit
onNestedPreScroll(parent: ViewParent!, target: View!, dx: Int, dy: Int, consumed: IntArray!)

React to a nested scroll in progress before the target view consumes a portion of the scroll.

static Unit
onNestedPreScroll(parent: ViewParent!, target: View!, dx: Int, dy: Int, consumed: IntArray!, type: Int)

React to a nested scroll in progress before the target view consumes a portion of the scroll.

static Unit
onNestedScroll(parent: ViewParent!, target: View!, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int)

React to a nested scroll in progress.

static Unit
onNestedScroll(parent: ViewParent!, target: View!, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int)

React to a nested scroll in progress.

static Unit
onNestedScroll(parent: ViewParent!, target: View!, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int, @NonNull consumed: IntArray)

React to a nested scroll in progress.

static Unit
onNestedScrollAccepted(parent: ViewParent!, child: View!, target: View!, nestedScrollAxes: Int)

React to the successful claiming of a nested scroll operation.

static Unit
onNestedScrollAccepted(parent: ViewParent!, child: View!, target: View!, nestedScrollAxes: Int, type: Int)

React to the successful claiming of a nested scroll operation.

static Boolean
onStartNestedScroll(parent: ViewParent!, child: View!, target: View!, nestedScrollAxes: Int)

React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.

static Boolean
onStartNestedScroll(parent: ViewParent!, child: View!, target: View!, nestedScrollAxes: Int, type: Int)

React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.

static Unit
onStopNestedScroll(parent: ViewParent!, target: View!)

React to a nested scroll operation ending.

static Unit
onStopNestedScroll(parent: ViewParent!, target: View!, type: Int)

React to a nested scroll operation ending.

static Boolean

Called by a child to request from its parent to send an AccessibilityEvent.

Public methods

notifySubtreeAccessibilityStateChanged

static fun notifySubtreeAccessibilityStateChanged(
    parent: ViewParent!,
    child: View!,
    source: View!,
    changeType: Int
): Unit

Notifies a view parent that the accessibility state of one of its descendants has changed and that the structure of the subtree is different.

Parameters
child View!: The direct child whose subtree has changed.
source View!: The descendant view that changed.
changeType Int: A bit mask of the types of changes that occurred. One or more of:

onNestedFling

static fun onNestedFling(
    parent: ViewParent!,
    target: View!,