O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

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)

<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: IntArray)

open Boolean
dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?, type: Int)

open Boolean
dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?)

open Unit
draw(canvas: Canvas!)

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(velocityY: Int)

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

open Boolean

open Boolean

Indicates whether this ScrollView's content is stretched to fill the viewport.

open Boolean

open Boolean

open Unit

open Boolean

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
onNestedPreScroll(@NonNull target: View, dx: Int, dy: Int, @NonNull consumed: IntArray, type: Int)

open Unit
onNestedPreScroll(@NonNull target: View, dx: Int, dy: Int, @NonNull consumed: IntArray)

open Unit
onNestedScroll(@NonNull target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int, @NonNull consumed: IntArray)

open Unit
onNestedScroll(@NonNull target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int)

open Unit
onNestedScroll(@NonNull target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int)

open Unit
onNestedScrollAccepted(@NonNull child: View, @NonNull target: View, axes: Int, type: Int)

open Unit
onNestedScrollAccepted(@NonNull child: View, @NonNull target: View, nestedScrollAxes: Int)

open Boolean
onStartNestedScroll(@NonNull child: View, @NonNull target: View, axes: Int, type: Int)

open Boolean
onStartNestedScroll(@NonNull child: View, @NonNull target: View, nestedScrollAxes: Int)

open Unit
onStopNestedScroll(@NonNull target: View, type: Int)

open Unit
onStopNestedScroll(@NonNull target: View)

open Boolean

open Boolean
pageScroll(direction: Int)

Handles scrolling in response to a "page up/down" shortcut press.

open Unit
requestChildFocus(child: View!, focused: View!)

open Boolean
requestChildRectangleOnScreen(child: View!, rectangle: Rect!, immediate: Boolean)

open Unit

open Unit

open Unit
scrollTo(x: Int, y: Int)

This version also clamps the scrolling to the bounds of our child.

open Unit
setFillViewport(fillViewport: Boolean)

Set whether this ScrollView should stretch its content height to fill the viewport or not.

open Unit

open Unit

Register a callback to be invoked when the scroll X or Y positions of this view change.

open Unit
setSmoothScrollingEnabled(smoothScrollingEnabled: Boolean)

Set whether arrow scrolling will animate its transition.

open Boolean

Unit
smoothScrollBy(dx: Int, dy: Int)

Like View#scrollBy, but scroll smoothly instead of immediately.

Unit
smoothScrollBy(dx: Int, dy: Int, scrollDurationMs: Int)

Like View#scrollBy, but scroll smoothly instead of immediately.

Unit

Like scrollTo, but scroll smoothly instead of immediately.

Unit
smoothScrollTo(x: Int, y: Int, scrollDurationMs: Int)

Like scrollTo, but scroll smoothly instead of immediately.

open Boolean
startNestedScroll(axes: Int, type: Int)

open Boolean

open Unit

open Unit

Protected methods
open Int

Compute the amount to scroll in the Y direction in order to get a rectangle completely on the screen (or, if taller than the screen, at least the first screen size chunk of it).

open Float

open Float

open Unit
measureChild(child: View!, parentWidthMeasureSpec: Int, parentHeightMeasureSpec: Int)

open Unit
measureChildWithMargins(child: View!, parentWidthMeasureSpec: Int, widthUsed: Int, parentHeightMeasureSpec: Int, heightUsed: Int)

open Unit
onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int)

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

open Unit
onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean)

open Boolean
onRequestFocusInDescendants(direction: Int, previouslyFocusedRect: Rect!)

When looking for focus in children of a scroll view, need to be a little more careful not to give focus to something that is scrolled off screen.

open Unit

open Parcelable?

open Unit
onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int)

open Unit
onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int)

Public constructors

<init>

NestedScrollView(@NonNull context: Context)

<init>

NestedScrollView(
&nb