# ViewParentCompat

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)   
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary: [Methods](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#inhmethods) \| [\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#)  

# ViewParentCompat

| This package is part of the Android [support library](https://developer.android.com/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](https://developer.android.com/jetpack/androidx) which is part of [Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](https://developer.android.com/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class
| mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).


`
public

final

class
ViewParentCompat
`


`

extends Object


`

`


`

|---|------------------------------------------|
| java.lang.Object                            ||
| ↳ | android.support.v4.view.ViewParentCompat |

<br />

*** ** * ** ***

Helper for accessing features in [ViewParent](https://developer.android.com/reference/android/view/ViewParent.html).

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                             ||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static void`    | ` `[notifySubtreeAccessibilityStateChanged](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#notifySubtreeAccessibilityStateChanged(android.view.ViewParent, android.view.View, android.view.View, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` source, int changeType) ` 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](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedFling(android.view.ViewParent, android.view.View, float, float, boolean))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, float velocityX, float velocityY, boolean consumed) ` Request a fling from a nested scroll.                                                                                                                                                                                                                                                                                                                                                                                        |
| ` static boolean` | ` `[onNestedPreFling](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedPreFling(android.view.ViewParent, android.view.View, float, float))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, float velocityX, float velocityY) ` React to a nested fling before the target view consumes it.                                                                                                                                                                                                                                                                                                                                                                                       |
| ` static void`    | ` `[onNestedPreScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedPreScroll(android.view.ViewParent, android.view.View, int, int, int[], int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, int dx, int dy, int[] consumed, int type) ` React to a nested scroll in progress before the target view consumes a portion of the scroll.                                                                                                                                                                                                                                                                                                                                   |
| ` static void`    | ` `[onNestedPreScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedPreScroll(android.view.ViewParent, android.view.View, int, int, int[]))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, int dx, int dy, int[] consumed) ` React to a nested scroll in progress before the target view consumes a portion of the scroll.                                                                                                                                                                                                                                                                                                                                                  |
| ` static void`    | ` `[onNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScroll(android.view.ViewParent, android.view.View, int, int, int, int, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type) ` React to a nested scroll in progress.                                                                                                                                                                                                                                                                                                                                                          |
| ` static void`    | ` `[onNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScroll(android.view.ViewParent, android.view.View, int, int, int, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) ` React to a nested scroll in progress.                                                                                                                                                                                                                                                                                                                                                                         |
| ` static void`    | ` `[onNestedScrollAccepted](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScrollAccepted(android.view.ViewParent, android.view.View, android.view.View, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int nestedScrollAxes) ` React to the successful claiming of a nested scroll operation.                                                                                                                                                                                                                                                                                          |
| ` static void`    | ` `[onNestedScrollAccepted](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScrollAccepted(android.view.ViewParent, android.view.View, android.view.View, int, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int nestedScrollAxes, int type) ` React to the successful claiming of a nested scroll operation.                                                                                                                                                                                                                                                                           |
| ` static boolean` | ` `[onStartNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int nestedScrollAxes, int type) ` React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.                                                                                                                                                                                                                        |
| ` static boolean` | ` `[onStartNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int nestedScrollAxes) ` React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.                                                                                                                                                                                                                                       |
| ` static void`    | ` `[onStopNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStopNestedScroll(android.view.ViewParent, android.view.View))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target) ` React to a nested scroll operation ending.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` static void`    | ` `[onStopNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStopNestedScroll(android.view.ViewParent, android.view.View, int))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` target, int type) ` React to a nested scroll operation ending.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` static boolean` | ` `[requestSendAccessibilityEvent](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#requestSendAccessibilityEvent(android.view.ViewParent, android.view.View, android.view.accessibility.AccessibilityEvent))`(`[ViewParent](https://developer.android.com/reference/android/view/ViewParent.html)` parent, `[View](https://developer.android.com/reference/android/view/View.html)` child, `[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` event) ` *This method was deprecated in API level 26.1.0. Use [requestSendAccessibilityEvent(View, AccessibilityEvent)](https://developer.android.com/reference/android/view/ViewParent.html#requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent)) directly.* |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#)From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### notifySubtreeAccessibilityStateChanged

added in [version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void notifySubtreeAccessibilityStateChanged (ViewParent parent, 
                View child, 
                View source, 
                int changeType)
```

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

<br />

|                                                                                                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                                                                                                      ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`     | `ViewParent` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `child`      | `View`: The direct child whose subtree has changed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `source`     | `View`: The descendant view that changed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `changeType` | `int`: A bit mask of the types of changes that occurred. One or more of: - [CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION) - [CONTENT_CHANGE_TYPE_SUBTREE](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#CONTENT_CHANGE_TYPE_SUBTREE) - [CONTENT_CHANGE_TYPE_TEXT](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#CONTENT_CHANGE_TYPE_TEXT) - [CONTENT_CHANGE_TYPE_UNDEFINED](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#CONTENT_CHANGE_TYPE_UNDEFINED) <br /> |

### onNestedFling

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onNestedFling (ViewParent parent, 
                View target, 
                float velocityX, 
                float velocityY, 
                boolean consumed)
```

Request a fling from a nested scroll.

This method signifies that a nested scrolling child has detected suitable conditions
for a fling. Generally this means that a touch scroll has ended with a
[velocity](https://developer.android.com/reference/android/view/VelocityTracker.html) in the direction of scrolling that meets or exceeds
the [minimum fling velocity](https://developer.android.com/reference/android/view/ViewConfiguration.html#getScaledMinimumFlingVelocity())
along a scrollable axis.

If a nested scrolling child view would normally fling but it is at the edge of
its own content, it can use this method to delegate the fling to its nested scrolling
parent instead. The parent may optionally consume the fling or observe a child fling.

<br />

<br />

|                                      Parameters                                      ||
|-------------|-------------------------------------------------------------------------|
| `parent`    | `ViewParent` <br />                                                     |
| `target`    | `View`: View that initiated the nested scroll <br />                    |
| `velocityX` | `float`: Horizontal velocity in pixels per second <br />                |
| `velocityY` | `float`: Vertical velocity in pixels per second <br />                  |
| `consumed`  | `boolean`: true if the child consumed the fling, false otherwise <br /> |

|                                     Returns                                      ||
|-----------|-----------------------------------------------------------------------|
| `boolean` | true if this parent consumed or otherwise reacted to the fling <br /> |

### onNestedPreFling

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onNestedPreFling (ViewParent parent, 
                View target, 
                float velocityX, 
                float velocityY)
```

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

This method siginfies that a nested scrolling child has detected a fling with the given
velocity along each axis. Generally this means that a touch scroll has ended with a
[velocity](https://developer.android.com/reference/android/view/VelocityTracker.html) in the direction of scrolling that meets or exceeds
the [minimum fling velocity](https://developer.android.com/reference/android/view/ViewConfiguration.html#getScaledMinimumFlingVelocity())
along a scrollable axis.

If a nested scrolling parent is consuming motion as part of a
[pre-scroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedPreScroll(android.view.ViewParent, android.view.View, int, int, int[])), it may be
appropriate for it to also consume the pre-fling to complete that same motion. By returning
`true` from this method, the parent indicates that the child should not
fling its own internal content as well.

<br />

<br />

|                              Parameters                               ||
|-------------|----------------------------------------------------------|
| `parent`    | `ViewParent` <br />                                      |
| `target`    | `View`: View that initiated the nested scroll <br />     |
| `velocityX` | `float`: Horizontal velocity in pixels per second <br /> |
| `velocityY` | `float`: Vertical velocity in pixels per second <br />   |

|                                      Returns                                      ||
|-----------|------------------------------------------------------------------------|
| `boolean` | true if this parent consumed the fling ahead of the target view <br /> |

### onNestedPreScroll

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedPreScroll (ViewParent parent, 
                View target, 
                int dx, 
                int dy, 
                int[] consumed, 
                int type)
```

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

When working with nested scrolling often the parent view may want an opportunity
to consume the scroll before the nested scrolling child does. An example of this is a
drawer that contains a scrollable list. The user will want to be able to scroll the list
fully into view before the list itself begins scrolling.

`onNestedPreScroll` is called when a nested scrolling child invokes
[dispatchNestedPreScroll(View, int, int, int[], int[])](https://developer.android.com/reference/android/support/v4/view/ViewCompat#dispatchNestedPreScroll(android.view.View, int, int, int[], int[])). The implementation
should report how any pixels of the scroll reported by dx, dy were consumed in the
`consumed` array. Index 0 corresponds to dx and index 1 corresponds to dy.
This parameter will never be null. Initial values for consumed\[0\] and consumed\[1\]
will always be 0.

<br />

<br />

|                                              Parameters                                               ||
|------------|-------------------------------------------------------------------------------------------|
| `parent`   | `ViewParent` <br />                                                                       |
| `target`   | `View`: View that initiated the nested scroll <br />                                      |
| `dx`       | `int`: Horizontal scroll distance in pixels <br />                                        |
| `dy`       | `int`: Vertical scroll distance in pixels <br />                                          |
| `consumed` | `int`: Output. The horizontal and vertical scroll distance consumed by this parent <br /> |
| `type`     | `int`: the type of input which cause this scroll event <br />                             |

### onNestedPreScroll

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedPreScroll (ViewParent parent, 
                View target, 
                int dx, 
                int dy, 
                int[] consumed)
```

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

This version of the method just calls
[onNestedPreScroll(ViewParent, View, int, int, int[], int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedPreScroll(android.view.ViewParent, android.view.View, int, int, int[], int)) using the touch input
type.

<br />

<br />

|                                              Parameters                                               ||
|------------|-------------------------------------------------------------------------------------------|
| `parent`   | `ViewParent` <br />                                                                       |
| `target`   | `View`: View that initiated the nested scroll <br />                                      |
| `dx`       | `int`: Horizontal scroll distance in pixels <br />                                        |
| `dy`       | `int`: Vertical scroll distance in pixels <br />                                          |
| `consumed` | `int`: Output. The horizontal and vertical scroll distance consumed by this parent <br /> |

### onNestedScroll

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedScroll (ViewParent parent, 
                View target, 
                int dxConsumed, 
                int dyConsumed, 
                int dxUnconsumed, 
                int dyUnconsumed, 
                int type)
```

React to a nested scroll in progress.

This method will be called when the ViewParent's current nested scrolling child view
dispatches a nested scroll event. To receive calls to this method the ViewParent must have
previously returned `true` for a call to
[onStartNestedScroll(ViewParent, View, View, int, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int, int)).

Both the consumed and unconsumed portions of the scroll distance are reported to the
ViewParent. An implementation may choose to use the consumed portion to match or chase scroll
position of multiple child elements, for example. The unconsumed portion may be used to
allow continuous dragging of multiple scrolling or draggable elements, such as scrolling
a list within a vertical drawer where the drawer begins dragging once the edge of inner
scrolling content is reached.

<br />

<br />

|                                          Parameters                                           ||
|----------------|-------------------------------------------------------------------------------|
| `parent`       | `ViewParent` <br />                                                           |
| `target`       | `View`: The descendent view controlling the nested scroll <br />              |
| `dxConsumed`   | `int`: Horizontal scroll distance in pixels already consumed by target <br /> |
| `dyConsumed`   | `int`: Vertical scroll distance in pixels already consumed by target <br />   |
| `dxUnconsumed` | `int`: Horizontal scroll distance in pixels not consumed by target <br />     |
| `dyUnconsumed` | `int`: Vertical scroll distance in pixels not consumed by target <br />       |
| `type`         | `int`: the type of input which cause this scroll event <br />                 |

### onNestedScroll

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedScroll (ViewParent parent, 
                View target, 
                int dxConsumed, 
                int dyConsumed, 
                int dxUnconsumed, 
                int dyUnconsumed)
```

React to a nested scroll in progress.

This version of the method just calls
[onNestedScroll(ViewParent, View, int, int, int, int, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScroll(android.view.ViewParent, android.view.View, int, int, int, int, int)) using the touch input
type.

<br />

<br />

|                                          Parameters                                           ||
|----------------|-------------------------------------------------------------------------------|
| `parent`       | `ViewParent` <br />                                                           |
| `target`       | `View`: The descendent view controlling the nested scroll <br />              |
| `dxConsumed`   | `int`: Horizontal scroll distance in pixels already consumed by target <br /> |
| `dyConsumed`   | `int`: Vertical scroll distance in pixels already consumed by target <br />   |
| `dxUnconsumed` | `int`: Horizontal scroll distance in pixels not consumed by target <br />     |
| `dyUnconsumed` | `int`: Vertical scroll distance in pixels not consumed by target <br />       |

### onNestedScrollAccepted

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedScrollAccepted (ViewParent parent, 
                View child, 
                View target, 
                int nestedScrollAxes)
```

React to the successful claiming of a nested scroll operation.

This version of the method just calls
[onNestedScrollAccepted(ViewParent, View, View, int, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onNestedScrollAccepted(android.view.ViewParent, android.view.View, android.view.View, int, int)) using the touch input type.

<br />

<br />

|                                                                                                                                                     Parameters                                                                                                                                                     ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`           | `ViewParent` <br />                                                                                                                                                                                                                                                                            |
| `child`            | `View`: Direct child of this ViewParent containing target <br />                                                                                                                                                                                                                               |
| `target`           | `View`: View that initiated the nested scroll <br />                                                                                                                                                                                                                                           |
| `nestedScrollAxes` | `int`: Flags consisting of [SCROLL_AXIS_HORIZONTAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_HORIZONTAL), [SCROLL_AXIS_VERTICAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_VERTICAL) or both <br /> |

### onNestedScrollAccepted

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onNestedScrollAccepted (ViewParent parent, 
                View child, 
                View target, 
                int nestedScrollAxes, 
                int type)
```

React to the successful claiming of a nested scroll operation.

This method will be called after
[onStartNestedScroll](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int)) returns true.
It offers an opportunity for the view and its superclasses to perform initial configuration
for the nested scroll. Implementations of this method should always call their superclass's
implementation of this method if one is present.

<br />

<br />

|                                                                                                                                                     Parameters                                                                                                                                                     ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`           | `ViewParent` <br />                                                                                                                                                                                                                                                                            |
| `child`            | `View`: Direct child of this ViewParent containing target <br />                                                                                                                                                                                                                               |
| `target`           | `View`: View that initiated the nested scroll <br />                                                                                                                                                                                                                                           |
| `nestedScrollAxes` | `int`: Flags consisting of [SCROLL_AXIS_HORIZONTAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_HORIZONTAL), [SCROLL_AXIS_VERTICAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_VERTICAL) or both <br /> |
| `type`             | `int`: the type of input which cause this scroll event <br />                                                                                                                                                                                                                                  |

**See also:**

- [onStartNestedScroll(ViewParent, View, View, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int))
- [onStopNestedScroll(ViewParent, View, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStopNestedScroll(android.view.ViewParent, android.view.View, int))  

### onStartNestedScroll

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onStartNestedScroll (ViewParent parent, 
                View child, 
                View target, 
                int nestedScrollAxes, 
                int type)
```

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

This method will be called in response to a descendant view invoking
[startNestedScroll(View, int)](https://developer.android.com/reference/android/support/v4/view/ViewCompat#startNestedScroll(android.view.View, int)). Each parent up the view hierarchy will be
given an opportunity to respond and claim the nested scrolling operation by returning
`true`.

This method may be overridden by ViewParent implementations to indicate when the view
is willing to support a nested scrolling operation that is about to begin. If it returns
true, this ViewParent will become the target view's nested scrolling parent for the duration
of the scroll operation in progress. When the nested scroll is finished this ViewParent
will receive a call to [onStopNestedScroll(ViewParent, View, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStopNestedScroll(android.view.ViewParent, android.view.View, int)).

<br />

<br />

|                                                                                                                                                     Parameters                                                                                                                                                     ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`           | `ViewParent` <br />                                                                                                                                                                                                                                                                            |
| `child`            | `View`: Direct child of this ViewParent containing target <br />                                                                                                                                                                                                                               |
| `target`           | `View`: View that initiated the nested scroll <br />                                                                                                                                                                                                                                           |
| `nestedScrollAxes` | `int`: Flags consisting of [SCROLL_AXIS_HORIZONTAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_HORIZONTAL), [SCROLL_AXIS_VERTICAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_VERTICAL) or both <br /> |
| `type`             | `int`: the type of input which cause this scroll event <br />                                                                                                                                                                                                                                  |

|                                    Returns                                    ||
|-----------|--------------------------------------------------------------------|
| `boolean` | true if this ViewParent accepts the nested scroll operation <br /> |

### onStartNestedScroll

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onStartNestedScroll (ViewParent parent, 
                View child, 
                View target, 
                int nestedScrollAxes)
```

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

This version of the method just calls
[onStartNestedScroll(ViewParent, View, View, int, int)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStartNestedScroll(android.view.ViewParent, android.view.View, android.view.View, int, int)) using the touch input type.

<br />

<br />

|                                                                                                                                                     Parameters                                                                                                                                                     ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`           | `ViewParent` <br />                                                                                                                                                                                                                                                                            |
| `child`            | `View`: Direct child of this ViewParent containing target <br />                                                                                                                                                                                                                               |
| `target`           | `View`: View that initiated the nested scroll <br />                                                                                                                                                                                                                                           |
| `nestedScrollAxes` | `int`: Flags consisting of [SCROLL_AXIS_HORIZONTAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_HORIZONTAL), [SCROLL_AXIS_VERTICAL](https://developer.android.com/reference/android/support/v4/view/ViewCompat#SCROLL_AXIS_VERTICAL) or both <br /> |

|                                    Returns                                    ||
|-----------|--------------------------------------------------------------------|
| `boolean` | true if this ViewParent accepts the nested scroll operation <br /> |

### onStopNestedScroll

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onStopNestedScroll (ViewParent parent, 
                View target)
```

React to a nested scroll operation ending.

This version of the method just calls [onStopNestedScroll(ViewParent, View)](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat#onStopNestedScroll(android.view.ViewParent, android.view.View))
using the touch input type.

<br />

<br />

|                           Parameters                           ||
|----------|------------------------------------------------------|
| `parent` | `ViewParent` <br />                                  |
| `target` | `View`: View that initiated the nested scroll <br /> |

### onStopNestedScroll

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onStopNestedScroll (ViewParent parent, 
                View target, 
                int type)
```

React to a nested scroll operation ending.

Perform cleanup after a nested scrolling operation.
This method will be called when a nested scroll stops, for example when a nested touch
scroll ends with a [ACTION_UP](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_UP) or [ACTION_CANCEL](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_CANCEL) event.
Implementations of this method should always call their superclass's implementation of this
method if one is present.

<br />

<br />

|                               Parameters                                ||
|----------|---------------------------------------------------------------|
| `parent` | `ViewParent` <br />                                           |
| `target` | `View`: View that initiated the nested scroll <br />          |
| `type`   | `int`: the type of input which cause this scroll event <br /> |

### requestSendAccessibilityEvent

added in [version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean requestSendAccessibilityEvent (ViewParent parent, 
                View child, 
                AccessibilityEvent event)
```


**This method was deprecated
in API level 26.1.0.**   

Use [requestSendAccessibilityEvent(View, AccessibilityEvent)](https://developer.android.com/reference/android/view/ViewParent.html#requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent))
directly.

Called by a child to request from its parent to send an [AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html).
The child has already populated a record for itself in the event and is delegating
to its parent to send the event. The parent can optionally add a record for itself.


Note: An accessibility event is fired by an individual view which populates the
event with a record for its state and requests from its parent to perform
the sending. The parent can optionally add a record for itself before
dispatching the request to its parent. A parent can also choose not to
respect the request for sending the event. The accessibility event is sent
by the topmost view in the view tree.

<br />

<br />

|                              Parameters                              ||
|----------|------------------------------------------------------------|
| `parent` | `ViewParent`: The parent whose method to invoke. <br />    |
| `child`  | `View`: The child which requests sending the event. <br /> |
| `event`  | `AccessibilityEvent`: The event to be sent. <br />         |

|                    Returns                    ||
|-----------|------------------------------------|
| `boolean` | True if the event was sent. <br /> |

-

  ## Annotations

  - [ViewPager.DecorView](https://developer.android.com/reference/android/support/v4/view/ViewPager.DecorView)
-

  ## Interfaces

  - [ActionProvider.VisibilityListener](https://developer.android.com/reference/android/support/v4/view/ActionProvider.VisibilityListener)
  - [AsyncLayoutInflater.OnInflateFinishedListener](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater.OnInflateFinishedListener)
  - [LayoutInflaterFactory](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterFactory)
  - [MenuItemCompat.OnActionExpandListener](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat.OnActionExpandListener)
  - [NestedScrollingChild](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild)
  - [NestedScrollingChild2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild2)
  - [NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)
  - [NestedScrollingParent2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent2)
  - [OnApplyWindowInsetsListener](https://developer.android.com/reference/android/support/v4/view/OnApplyWindowInsetsListener)
  - [ScrollingView](https://developer.android.com/reference/android/support/v4/view/ScrollingView)
  - [TintableBackgroundView](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView)
  - [ViewPager.OnAdapterChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnAdapterChangeListener)
  - [ViewPager.OnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnPageChangeListener)
  - [ViewPager.PageTransformer](https://developer.android.com/reference/android/support/v4/view/ViewPager.PageTransformer)
  - [ViewPropertyAnimatorListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListener)
  - [ViewPropertyAnimatorUpdateListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorUpdateListener)
-

  ## Classes

  - [AbsSavedState](https://developer.android.com/reference/android/support/v4/view/AbsSavedState)
  - [AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat)
  - [ActionProvider](https://developer.android.com/reference/android/support/v4/view/ActionProvider)
  - [AsyncLayoutInflater](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater)
  - [GestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/GestureDetectorCompat)
  - [GravityCompat](https://developer.android.com/reference/android/support/v4/view/GravityCompat)
  - [InputDeviceCompat](https://developer.android.com/reference/android/support/v4/view/InputDeviceCompat)
  - [LayoutInflaterCompat](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterCompat)
  - [MarginLayoutParamsCompat](https://developer.android.com/reference/android/support/v4/view/MarginLayoutParamsCompat)
  - [MenuCompat](https://developer.android.com/reference/android/support/v4/view/MenuCompat)
  - [MenuItemCompat](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat)
  - [MotionEventCompat](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat)
  - [NestedScrollingChildHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChildHelper)
  - [NestedScrollingParentHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper)
  - [PagerAdapter](https://developer.android.com/reference/android/support/v4/view/PagerAdapter)
  - [PagerTabStrip](https://developer.android.com/reference/android/support/v4/view/PagerTabStrip)
  - [PagerTitleStrip](https://developer.android.com/reference/android/support/v4/view/PagerTitleStrip)
  - [PointerIconCompat](https://developer.android.com/reference/android/support/v4/view/PointerIconCompat)
  - [ScaleGestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/ScaleGestureDetectorCompat)
  - [VelocityTrackerCompat](https://developer.android.com/reference/android/support/v4/view/VelocityTrackerCompat)
  - [ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat)
  - [ViewConfigurationCompat](https://developer.android.com/reference/android/support/v4/view/ViewConfigurationCompat)
  - [ViewGroupCompat](https://developer.android.com/reference/android/support/v4/view/ViewGroupCompat)
  - [ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager)
  - [ViewPager.LayoutParams](https://developer.android.com/reference/android/support/v4/view/ViewPager.LayoutParams)
  - [ViewPager.SavedState](https://developer.android.com/reference/android/support/v4/view/ViewPager.SavedState)
  - [ViewPager.SimpleOnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.SimpleOnPageChangeListener)
  - [ViewParentCompat](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat)
  - [ViewPropertyAnimatorCompat](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorCompat)
  - [ViewPropertyAnimatorListenerAdapter](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListenerAdapter)
  - [WindowCompat](https://developer.android.com/reference/android/support/v4/view/WindowCompat)
  - [WindowInsetsCompat](https://developer.android.com/reference/android/support/v4/view/WindowInsetsCompat)