# NestedScrollingParentHelper

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:[Ctors](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#)  

# NestedScrollingParentHelper

| 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


class
NestedScrollingParentHelper
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

Helper class for implementing nested scrolling parent views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21).

[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclasses should instantiate a final instance of this class as a field at construction. For each`ViewGroup`method that has a matching method signature in this class, delegate the operation to the helper instance in an overridden method implementation. This implements the standard framework policy for nested scrolling.

Views invoking nested scrolling functionality should always do so from the relevant[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat),[ViewGroupCompat](https://developer.android.com/reference/android/support/v4/view/ViewGroupCompat)or[ViewParentCompat](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat)compatibility shim static methods. This ensures interoperability with nested scrolling views on Android 5.0 Lollipop and newer.

<br />

## Summary

|                                                                                                                                                      ### Public constructors                                                                                                                                                       ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[NestedScrollingParentHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#NestedScrollingParentHelper(android.view.ViewGroup))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` viewGroup) ` Construct a new helper for a given ViewGroup |

|                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                            ||
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`  | ` `[getNestedScrollAxes](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#getNestedScrollAxes())`() ` Return the current axes of nested scrolling for this ViewGroup.                                                                                                                                                                                                                                                                               |
| ` void` | ` `[onNestedScrollAccepted](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#onNestedScrollAccepted(android.view.View, android.view.View, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int axes) ` Called when a nested scrolling operation initiated by a descendant view is accepted by this ViewGroup.                |
| ` void` | ` `[onNestedScrollAccepted](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#onNestedScrollAccepted(android.view.View, android.view.View, int, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` child, `[View](https://developer.android.com/reference/android/view/View.html)` target, int axes, int type) ` Called when a nested scrolling operation initiated by a descendant view is accepted by this ViewGroup. |
| ` void` | ` `[onStopNestedScroll](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#onStopNestedScroll(android.view.View, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` target, int type) ` React to a nested scroll operation ending.                                                                                                                                                                                       |
| ` void` | ` `[onStopNestedScroll](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#onStopNestedScroll(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` target) ` React to a nested scroll operation ending.                                                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper#)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 constructors

### NestedScrollingParentHelper

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

```
NestedScrollingParentHelper (ViewGroup viewGroup)
```

Construct a new helper for a given ViewGroup

<br />

|           Parameters            ||
|-------------|--------------------|
| `viewGroup` | `ViewGroup` <br /> |

## Public methods

### getNestedScrollAxes

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

```
int getNestedScrollAxes ()
```

Return the current axes of nested scrolling for this ViewGroup.

This is a delegate method. Call it from your[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclass method/[NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)interface method with the same signature to implement the standard policy.

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### onNestedScrollAccepted

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

```
void onNestedScrollAccepted (View child, 
                View target, 
                int axes)
```

Called when a nested scrolling operation initiated by a descendant view is accepted by this ViewGroup.

This is a delegate method. Call it from your[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclass method/[NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)interface method with the same signature to implement the standard policy.

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `child`  | `View` <br /> |
| `target` | `View` <br /> |
| `axes`   | `int` <br />  |

### onNestedScrollAccepted

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

```
void onNestedScrollAccepted (View child, 
                View target, 
                int axes, 
                int type)
```

Called when a nested scrolling operation initiated by a descendant view is accepted by this ViewGroup.

This is a delegate method. Call it from your[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclass method/[NestedScrollingParent2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent2)interface method with the same signature to implement the standard policy.

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `child`  | `View` <br /> |
| `target` | `View` <br /> |
| `axes`   | `int` <br />  |
| `type`   | `int` <br />  |

### onStopNestedScroll

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

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

React to a nested scroll operation ending.

This is a delegate method. Call it from your[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclass method/[NestedScrollingParent2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent2)interface method with the same signature to implement the standard policy.

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `target` | `View` <br /> |
| `type`   | `int` <br />  |

### onStopNestedScroll

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

```
void onStopNestedScroll (View target)
```

React to a nested scroll operation ending.

This is a delegate method. Call it from your[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)subclass method/[NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)interface method with the same signature to implement the standard policy.

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `target` | `View` <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)