Google 致力于为黑人社区推动种族平等。查看具体举措


open class NestedScrollView : FrameLayout, NestedScrollingParent3, NestedScrollingChild3, ScrollingView
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ androidx.core.widget.NestedScrollView

NestedScrollView is just like android.widget.ScrollView, but it supports acting as both a nested scrolling parent and child on both new and old versions of Android. Nested scrolling is enabled by default.


Nested classes

Interface definition for a callback to be invoked when the scroll X or Y positions of a view change.

Public constructors
<init>(@NonNull context: Context)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int)

Public methods
open Unit
addView(child: View!)

open Unit
addView(child: View!, index: Int)

open Unit
addView(child: View!, params: LayoutParams!)

open Unit
addView(child: View!, index: Int, params: LayoutParams!)

open Boolean
arrowScroll(direction: Int)

Handle scrolling in response to an up or down arrow click.

open Unit

open Boolean

open Boolean
dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean)

open Boolean
dispatchNestedPreFling(velocityX: Float, velocityY: Float)

open Boolean
dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?, type: Int)

open Boolean
dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?)

open Unit
dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: IntArray?, type: Int, @NonNull consumed: