NestedScrollView
open class NestedScrollView : FrameLayout, NestedScrollingParent3, NestedScrollingChild3, ScrollingView
kotlin.Any | ||||
↳ | 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.
Summary
Nested classes | |
---|---|
abstract |
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, @Nullable attrs: AttributeSet?) |
|
<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int) |
Public methods | |
---|---|
open Unit | |
open Unit | |
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 |
dispatchKeyEvent(event: KeyEvent!) |
open Boolean |
dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean) |
open Boolean |
dispatchNestedPreFling(velocityX: Float, velocityY: Float) |
open Boolean | |
open Boolean |
dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?) |
open Unit | |
open Boolean | |
open Boolean | |
open Unit | |
open Boolean |
executeKeyEvent(@NonNull event: KeyEvent) You can call this function yourself to have the scroll view perform scrolling from a key event, just as if the event had been dispatched to it by the view hierarchy. |
open Unit |
Fling the scroll view |
open Boolean |
fullScroll(direction: Int) Handles scrolling in response to a "home/end" shortcut press. |
open Int | |
open Int | |
open Boolean |
hasNestedScrollingParent(type: Int) |
open Boolean | |
open Boolean |
Indicates whether this ScrollView's content is stretched to fill the viewport. |
open Boolean | |
open Boolean | |
open Unit | |
open Boolean |
onGenericMotionEvent(event: MotionEvent!) |
open Boolean | |
open Boolean |
onNestedFling(@NonNull target: View, velocityX: Float, velocityY: Float, consumed: Boolean) |
open Boolean |
onNestedPreFling(@NonNull target: View, velocityX: Float, velocityY: Float) |
open Unit | |
open Unit |
onNestedPreScroll(@NonNull target: View, dx: Int, dy: Int, @NonNull consumed: IntArray) |
open Unit |
onNestedScroll(@NonNull target: View, dxConsumed: Int, dyConsumed: Int, |