belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
NestedScrollingParentHelper
public
class
NestedScrollingParentHelper
extends Object
java.lang.Object | |
↳ | android.support.v4.view.NestedScrollingParentHelper |
Helper class for implementing nested scrolling parent views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21).
ViewGroup
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
, ViewGroupCompat
or
ViewParentCompat
compatibility
shim static methods. This ensures interoperability with nested scrolling views on Android
5.0 Lollipop and newer.
Summary
Public constructors | |
---|---|
NestedScrollingParentHelper(ViewGroup viewGroup)
Construct a new helper for a given ViewGroup |
Public methods | |
---|---|
int
|
getNestedScrollAxes()
Return the current axes of nested scrolling for this ViewGroup. |
void
|
onNestedScrollAccepted(View child, View target, int axes)
Called when a nested scrolling operation initiated by a descendant view is accepted by this ViewGroup. |
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. |
void
|
onStopNestedScroll(View target, int type)
React to a nested scroll operation ending. |
void
|
onStopNestedScroll(View target)
React to a nested scroll operation ending. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
NestedScrollingParentHelper
NestedScrollingParentHelper (ViewGroup viewGroup)
Construct a new helper for a given ViewGroup
Parameters | |
---|---|
viewGroup |
ViewGroup |
Public methods
getNestedScrollAxes
int getNestedScrollAxes ()
Return the current axes of nested scrolling for this ViewGroup.
This is a delegate method. Call it from your ViewGroup
subclass method/NestedScrollingParent
interface method with
the same signature to implement the standard policy.
Returns | |
---|---|
int |
onNestedScrollAccepted
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
subclass method/NestedScrollingParent
interface method with
the same signature to implement the standard policy.
Parameters | |
---|---|
child |
View |
target |
View |
axes |
int |
onNestedScrollAccepted
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
subclass method/NestedScrollingParent2
interface method with
the same signature to implement the standard policy.
Parameters | |
---|---|
child |
View |
target |
View |
axes |
int |
type |
int |
onStopNestedScroll
void onStopNestedScroll (View target, int type)
React to a nested scroll operation ending.
This is a delegate method. Call it from your ViewGroup
subclass method/NestedScrollingParent2
interface method with
the same signature to implement the standard policy.
Parameters | |
---|---|
target |
View |
type |
int |
onStopNestedScroll
void onStopNestedScroll (View target)
React to a nested scroll operation ending.
This is a delegate method. Call it from your ViewGroup
subclass method/NestedScrollingParent
interface method with
the same signature to implement the standard policy.
Parameters | |
---|---|
target |
View |
Annotations
Interfaces
- ActionProvider.VisibilityListener
- AsyncLayoutInflater.OnInflateFinishedListener
- LayoutInflaterFactory
- MenuItemCompat.OnActionExpandListener
- NestedScrollingChild
- NestedScrollingChild2
- NestedScrollingParent
- NestedScrollingParent2
- OnApplyWindowInsetsListener
- ScrollingView
- TintableBackgroundView
- ViewPager.OnAdapterChangeListener
- ViewPager.OnPageChangeListener
- ViewPager.PageTransformer
- ViewPropertyAnimatorListener
- ViewPropertyAnimatorUpdateListener
Classes
- AbsSavedState
- AccessibilityDelegateCompat
- ActionProvider
- AsyncLayoutInflater
- GestureDetectorCompat
- GravityCompat
- InputDeviceCompat
- LayoutInflaterCompat
- MarginLayoutParamsCompat
- MenuCompat
- MenuItemCompat
- MotionEventCompat
- NestedScrollingChildHelper
- NestedScrollingParentHelper
- PagerAdapter
- PagerTabStrip
- PagerTitleStrip
- PointerIconCompat
- ScaleGestureDetectorCompat
- VelocityTrackerCompat
- ViewCompat
- ViewConfigurationCompat
- ViewGroupCompat
- ViewPager
- ViewPager.LayoutParams
- ViewPager.SavedState
- ViewPager.SimpleOnPageChangeListener
- ViewParentCompat
- ViewPropertyAnimatorCompat
- ViewPropertyAnimatorListenerAdapter
- WindowCompat
- WindowInsetsCompat