Class NestedScrollView
- java.lang.Object
-
- android.view.View
-
- android.view.ViewGroup
-
- android.widget.FrameLayout
-
- com.cheetahdigital.uikit.widget.NestedScrollView
-
- All Implemented Interfaces:
android.graphics.drawable.Drawable.Callback,android.view.accessibility.AccessibilityEventSource,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,androidx.core.view.NestedScrollingChild,androidx.core.view.NestedScrollingChild2,androidx.core.view.NestedScrollingParent,androidx.core.view.ScrollingView
public class NestedScrollView extends android.widget.FrameLayout implements androidx.core.view.NestedScrollingParent, androidx.core.view.NestedScrollingChild2, androidx.core.view.ScrollingViewNestedScrollView is just likeScrollView, 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 Class Summary
Nested Classes Modifier and Type Class Description static interfaceNestedScrollView.OnScrollChangeListenerInterface definition for a callback to be invoked when the scroll X or Y positions of a view change.-
Nested classes/interfaces inherited from class android.widget.FrameLayout
android.widget.FrameLayout.LayoutParams
-
Nested classes/interfaces inherited from class android.view.ViewGroup
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
-
Nested classes/interfaces inherited from class android.view.View
android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListener
-
-
Field Summary
-
Fields inherited from class android.view.ViewGroup
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
-
Fields inherited from class android.view.View
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
-
-
Constructor Summary
Constructors Constructor Description NestedScrollView(android.content.Context context)NestedScrollView(android.content.Context context, android.util.AttributeSet attrs)NestedScrollView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)Constructor forNestedScrollView
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddView(android.view.View child)voidaddView(android.view.View child, int index)voidaddView(android.view.View child, int index, android.view.ViewGroup.LayoutParams params)voidaddView(android.view.View child, android.view.ViewGroup.LayoutParams params)booleanarrowScroll(int direction)Handle scrolling in response to an up or down arrow click.intcomputeHorizontalScrollExtent()intcomputeHorizontalScrollOffset()intcomputeHorizontalScrollRange()voidcomputeScroll()protected intcomputeScrollDeltaToGetChildRectOnScreen(android.graphics.Rect rect)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).intcomputeVerticalScrollExtent()intcomputeVerticalScrollOffset()intcomputeVerticalScrollRange()The scroll range of a scroll view is the overall height of all of its children.booleandispatchKeyEvent(android.view.KeyEvent event)booleandispatchNestedFling(float velocityX, float velocityY, boolean consumed)booleandispatchNestedPreFling(float velocityX, float velocityY)booleandispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow)booleandispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow, int type)booleandispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow)booleandispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow, int type)voiddraw(android.graphics.Canvas canvas)booleanexecuteKeyEvent(android.view.KeyEvent event)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.voidfling(int velocityY)Fling the scroll viewbooleanfullScroll(int direction)Handles scrolling in response to a "home/end" shortcut press.protected floatgetBottomFadingEdgeStrength()intgetMaxScrollAmount()intgetNestedScrollAxes()protected floatgetTopFadingEdgeStrength()booleanhasNestedScrollingParent()booleanhasNestedScrollingParent(int type)booleanisFillViewport()Indicates whether this ScrollView's content is stretched to fill the viewport.booleanisNestedScrollingEnabled()booleanisSmoothScrollingEnabled()protected voidmeasureChild(android.view.View child, int parentWidthMeasureSpec, int parentHeightMeasureSpec)protected voidmeasureChildWithMargins(android.view.View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed)voidonAttachedToWindow()booleanonGenericMotionEvent(android.view.MotionEvent event)booleanonInterceptTouchEvent(android.view.MotionEvent ev)protected voidonLayout(boolean changed, int l, int t, int r, int b)protected voidonMeasure(int widthMeasureSpec, int heightMeasureSpec)booleanonNestedFling(android.view.View target, float velocityX, float velocityY, boolean consumed)booleanonNestedPreFling(android.view.View target, float velocityX, float velocityY)voidonNestedPreScroll(android.view.View target, int dx, int dy, int[] consumed)voidonNestedScroll(android.view.View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed)voidonNestedScrollAccepted(android.view.View child, android.view.View target, int nestedScrollAxes)protected voidonOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY)protected booleanonRequestFocusInDescendants(int direction, android.graphics.Rect previouslyFocusedRect)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.protected voidonRestoreInstanceState(android.os.Parcelable state)protected android.os.ParcelableonSaveInstanceState()protected voidonScrollChanged(int l, int t, int oldl, int oldt)protected voidonSizeChanged(int w, int h, int oldw, int oldh)booleanonStartNestedScroll(android.view.View child, android.view.View target, int nestedScrollAxes)voidonStopNestedScroll(android.view.View target)booleanonTouchEvent(android.view.MotionEvent ev)booleanpageScroll(int direction)Handles scrolling in response to a "page up/down" shortcut press.voidrequestChildFocus(android.view.View child, android.view.View focused)booleanrequestChildRectangleOnScreen(android.view.View child, android.graphics.Rect rectangle, boolean immediate)voidrequestDisallowInterceptTouchEvent(boolean disallowIntercept)voidrequestLayout()voidscrollTo(int x, int y)voidsetFillViewport(boolean fillViewport)Set whether this ScrollView should stretch its content height to fill the viewport or not.voidsetNestedScrollingEnabled(boolean enabled)voidsetOnScrollChangeListener(NestedScrollView.OnScrollChangeListener l)Register a callback to be invoked when the scroll X or Y positions of this view change.voidsetSmoothScrollingEnabled(boolean smoothScrollingEnabled)Set whether arrow scrolling will animate its transition.booleanshouldDelayChildPressedState()voidsmoothScrollBy(int dx, int dy)LikeView.scrollBy(int, int), but scroll smoothly instead of immediately.voidsmoothScrollTo(int x, int y)LikescrollTo(int, int), but scroll smoothly instead of immediately.booleanstartNestedScroll(int axes)booleanstartNestedScroll(int axes, int type)voidstopNestedScroll()voidstopNestedScroll(int type)-
Methods inherited from class android.widget.FrameLayout
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren
-
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChildren, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onDetachedFromWindow, onInterceptHoverEvent, onNestedPrePerformAccessibilityAction, onRequestSendAccessibilityEvent, onResolvePointerIcon, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout
-
Methods inherited from class android.view.View
addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedPrePerformAccessibilityAction, dispatchPopulateAccessibilityEvent, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface android.view.ViewParent
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows
-
-
-
-
Constructor Detail
-
NestedScrollView
public NestedScrollView(android.content.Context context)
-
NestedScrollView
public NestedScrollView(android.content.Context context, android.util.AttributeSet attrs)
-
NestedScrollView
public NestedScrollView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)Constructor forNestedScrollView- Parameters:
context- context of the applicationattrs- set of propertiesdefStyleAttr- default style attribute
-
-
Method Detail
-
setNestedScrollingEnabled
public void setNestedScrollingEnabled(boolean enabled)
- Specified by:
setNestedScrollingEnabledin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
setNestedScrollingEnabledin classandroid.view.View
-
isNestedScrollingEnabled
public boolean isNestedScrollingEnabled()
- Specified by:
isNestedScrollingEnabledin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
isNestedScrollingEnabledin classandroid.view.View
-
startNestedScroll
public boolean startNestedScroll(int axes)
- Specified by:
startNestedScrollin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
startNestedScrollin classandroid.view.View
-
startNestedScroll
public boolean startNestedScroll(int axes, int type)- Specified by:
startNestedScrollin interfaceandroidx.core.view.NestedScrollingChild2
-
stopNestedScroll
public void stopNestedScroll()
- Specified by:
stopNestedScrollin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
stopNestedScrollin classandroid.view.View
-
stopNestedScroll
public void stopNestedScroll(int type)
- Specified by:
stopNestedScrollin interfaceandroidx.core.view.NestedScrollingChild2
-
hasNestedScrollingParent
public boolean hasNestedScrollingParent()
- Specified by:
hasNestedScrollingParentin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
hasNestedScrollingParentin classandroid.view.View
-
hasNestedScrollingParent
public boolean hasNestedScrollingParent(int type)
- Specified by:
hasNestedScrollingParentin interfaceandroidx.core.view.NestedScrollingChild2
-
dispatchNestedScroll
public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow)- Specified by:
dispatchNestedScrollin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
dispatchNestedScrollin classandroid.view.View
-
dispatchNestedScroll
public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow, int type)- Specified by:
dispatchNestedScrollin interfaceandroidx.core.view.NestedScrollingChild2
-
dispatchNestedPreScroll
public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow)- Specified by:
dispatchNestedPreScrollin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
dispatchNestedPreScrollin classandroid.view.View
-
dispatchNestedPreScroll
public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow, int type)- Specified by:
dispatchNestedPreScrollin interfaceandroidx.core.view.NestedScrollingChild2
-
dispatchNestedFling
public boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed)- Specified by:
dispatchNestedFlingin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
dispatchNestedFlingin classandroid.view.View
-
dispatchNestedPreFling
public boolean dispatchNestedPreFling(float velocityX, float velocityY)- Specified by:
dispatchNestedPreFlingin interfaceandroidx.core.view.NestedScrollingChild- Overrides:
dispatchNestedPreFlingin classandroid.view.View
-
onStartNestedScroll
public boolean onStartNestedScroll(android.view.View child, android.view.View target, int nestedScrollAxes)- Specified by:
onStartNestedScrollin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onStartNestedScrollin interfaceandroid.view.ViewParent- Overrides:
onStartNestedScrollin classandroid.view.ViewGroup
-
onNestedScrollAccepted
public void onNestedScrollAccepted(android.view.View child, android.view.View target, int nestedScrollAxes)- Specified by:
onNestedScrollAcceptedin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onNestedScrollAcceptedin interfaceandroid.view.ViewParent- Overrides:
onNestedScrollAcceptedin classandroid.view.ViewGroup
-
onStopNestedScroll
public void onStopNestedScroll(android.view.View target)
- Specified by:
onStopNestedScrollin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onStopNestedScrollin interfaceandroid.view.ViewParent- Overrides:
onStopNestedScrollin classandroid.view.ViewGroup
-
onNestedScroll
public void onNestedScroll(android.view.View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed)- Specified by:
onNestedScrollin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onNestedScrollin interfaceandroid.view.ViewParent- Overrides:
onNestedScrollin classandroid.view.ViewGroup
-
onNestedPreScroll
public void onNestedPreScroll(android.view.View target, int dx, int dy, int[] consumed)- Specified by:
onNestedPreScrollin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onNestedPreScrollin interfaceandroid.view.ViewParent- Overrides:
onNestedPreScrollin classandroid.view.ViewGroup
-
onNestedFling
public boolean onNestedFling(android.view.View target, float velocityX, float velocityY, boolean consumed)- Specified by:
onNestedFlingin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onNestedFlingin interfaceandroid.view.ViewParent- Overrides:
onNestedFlingin classandroid.view.ViewGroup
-
onNestedPreFling
public boolean onNestedPreFling(android.view.View target, float velocityX, float velocityY)- Specified by:
onNestedPreFlingin interfaceandroidx.core.view.NestedScrollingParent- Specified by:
onNestedPreFlingin interfaceandroid.view.ViewParent- Overrides:
onNestedPreFlingin classandroid.view.ViewGroup
-
getNestedScrollAxes
public int getNestedScrollAxes()
- Specified by:
getNestedScrollAxesin interfaceandroidx.core.view.NestedScrollingParent- Overrides:
getNestedScrollAxesin classandroid.view.ViewGroup
-
shouldDelayChildPressedState
public boolean shouldDelayChildPressedState()
- Overrides:
shouldDelayChildPressedStatein classandroid.widget.FrameLayout
-
getTopFadingEdgeStrength
protected float getTopFadingEdgeStrength()
- Overrides:
getTopFadingEdgeStrengthin classandroid.view.View
-
getBottomFadingEdgeStrength
protected float getBottomFadingEdgeStrength()
- Overrides:
getBottomFadingEdgeStrengthin classandroid.view.View
-
getMaxScrollAmount
public int getMaxScrollAmount()
- Returns:
- The maximum amount this scroll view will scroll in response to an arrow event.
-
addView
public void addView(android.view.View child)
- Overrides:
addViewin classandroid.view.ViewGroup
-
addView
public void addView(android.view.View child, int index)- Overrides:
addViewin classandroid.view.ViewGroup
-
addView
public void addView(android.view.View child, android.view.ViewGroup.LayoutParams params)- Specified by:
addViewin interfaceandroid.view.ViewManager- Overrides:
addViewin classandroid.view.ViewGroup
-
addView
public void addView(android.view.View child, int index, android.view.ViewGroup.LayoutParams params)- Overrides:
addViewin classandroid.view.ViewGroup
-
setOnScrollChangeListener
public void setOnScrollChangeListener(NestedScrollView.OnScrollChangeListener l)
Register a callback to be invoked when the scroll X or Y positions of this view change.This version of the method works on all versions of Android, back to API v4.
- Parameters:
l- The listener to notify when the scroll X or Y position changes.- See Also:
View.getScrollX(),View.getScrollY()
-
isFillViewport
public boolean isFillViewport()
Indicates whether this ScrollView's content is stretched to fill the viewport.- Returns:
- true if the content fills the viewport, false otherwise.
-
setFillViewport
public void setFillViewport(boolean fillViewport)
Set whether this ScrollView should stretch its content height to fill the viewport or not.- Parameters:
fillViewport- True to stretch the content's height to the viewport's boundaries, false otherwise.
-
isSmoothScrollingEnabled
public boolean isSmoothScrollingEnabled()
- Returns:
- Whether arrow scrolling will animate its transition.
-
setSmoothScrollingEnabled
public void setSmoothScrollingEnabled(boolean smoothScrollingEnabled)
Set whether arrow scrolling will animate its transition.- Parameters:
smoothScrollingEnabled- whether arrow scrolling will animate its transition
-
onScrollChanged
protected void onScrollChanged(int l, int t, int oldl, int oldt)- Overrides:
onScrollChangedin classandroid.view.View
-
onMeasure
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)- Overrides:
onMeasurein classandroid.widget.FrameLayout
-
dispatchKeyEvent
public boolean dispatchKeyEvent(android.view.KeyEvent event)
- Overrides:
dispatchKeyEventin classandroid.view.ViewGroup
-
executeKeyEvent
public boolean executeKeyEvent(android.view.KeyEvent event)
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.- Parameters:
event- The key event to execute.- Returns:
- Return true if the event was handled, else false.
-
requestDisallowInterceptTouchEvent
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept)
- Specified by:
requestDisallowInterceptTouchEventin interfaceandroid.view.ViewParent- Overrides:
requestDisallowInterceptTouchEventin classandroid.view.ViewGroup
-
onInterceptTouchEvent
public boolean onInterceptTouchEvent(android.view.MotionEvent ev)
- Overrides:
onInterceptTouchEventin classandroid.view.ViewGroup
-
onTouchEvent
public boolean onTouchEvent(android.view.MotionEvent ev)
- Overrides:
onTouchEventin classandroid.view.View
-
onGenericMotionEvent
public boolean onGenericMotionEvent(android.view.MotionEvent event)
- Overrides:
onGenericMotionEventin classandroid.view.View
-
onOverScrolled
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY)- Overrides:
onOverScrolledin classandroid.view.View
-
pageScroll
public boolean pageScroll(int direction)
Handles scrolling in response to a "page up/down" shortcut press. This method will scroll the view by one page up or down and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.
- Parameters:
direction- the scroll direction:View.FOCUS_UPto go one page up orView.FOCUS_DOWNto go one page down- Returns:
- true if the key event is consumed by this method, false otherwise
-
fullScroll
public boolean fullScroll(int direction)
Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.
- Parameters:
direction- the scroll direction:View.FOCUS_UPto go the top of the view orView.FOCUS_DOWNto go the bottom- Returns:
- true if the key event is consumed by this method, false otherwise
-
arrowScroll
public boolean arrowScroll(int direction)
Handle scrolling in response to an up or down arrow click.- Parameters:
direction- The direction corresponding to the arrow key that was pressed- Returns:
- True if we consumed the event, false otherwise
-
smoothScrollBy
public final void smoothScrollBy(int dx, int dy)LikeView.scrollBy(int, int), but scroll smoothly instead of immediately.- Parameters:
dx- the number of pixels to scroll by on the X axisdy- the number of pixels to scroll by on the Y axis
-
smoothScrollTo
public final void smoothScrollTo(int x, int y)LikescrollTo(int, int), but scroll smoothly instead of immediately.- Parameters:
x- the position where to scroll on the X axisy- the position where to scroll on the Y axis
-
computeVerticalScrollRange
public int computeVerticalScrollRange()
The scroll range of a scroll view is the overall height of all of its children.
- Specified by:
computeVerticalScrollRangein interfaceandroidx.core.view.ScrollingView- Overrides:
computeVerticalScrollRangein classandroid.view.View
-
computeVerticalScrollOffset
public int computeVerticalScrollOffset()
- Specified by:
computeVerticalScrollOffsetin interfaceandroidx.core.view.ScrollingView- Overrides:
computeVerticalScrollOffsetin classandroid.view.View
-
computeVerticalScrollExtent
public int computeVerticalScrollExtent()
- Specified by:
computeVerticalScrollExtentin interfaceandroidx.core.view.ScrollingView- Overrides:
computeVerticalScrollExtentin classandroid.view.View
-
computeHorizontalScrollRange
public int computeHorizontalScrollRange()
- Specified by:
computeHorizontalScrollRangein interfaceandroidx.core.view.ScrollingView- Overrides:
computeHorizontalScrollRangein classandroid.view.View
-
computeHorizontalScrollOffset
public int computeHorizontalScrollOffset()
- Specified by:
computeHorizontalScrollOffsetin interfaceandroidx.core.view.ScrollingView- Overrides:
computeHorizontalScrollOffsetin classandroid.view.View
-
computeHorizontalScrollExtent
public int computeHorizontalScrollExtent()
- Specified by:
computeHorizontalScrollExtentin interfaceandroidx.core.view.ScrollingView- Overrides:
computeHorizontalScrollExtentin classandroid.view.View
-
measureChild
protected void measureChild(android.view.View child, int parentWidthMeasureSpec, int parentHeightMeasureSpec)- Overrides:
measureChildin classandroid.view.ViewGroup
-
measureChildWithMargins
protected void measureChildWithMargins(android.view.View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed)- Overrides:
measureChildWithMarginsin classandroid.view.ViewGroup
-
computeScroll
public void computeScroll()
- Overrides:
computeScrollin classandroid.view.View
-
computeScrollDeltaToGetChildRectOnScreen
protected int computeScrollDeltaToGetChildRectOnScreen(android.graphics.Rect rect)
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).- Parameters:
rect- The rect.- Returns:
- The scroll delta.
-
requestChildFocus
public void requestChildFocus(android.view.View child, android.view.View focused)- Specified by:
requestChildFocusin interfaceandroid.view.ViewParent- Overrides:
requestChildFocusin classandroid.view.ViewGroup
-
onRequestFocusInDescendants
protected boolean onRequestFocusInDescendants(int direction, android.graphics.Rect previouslyFocusedRect)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.This is more expensive than the default
ViewGroupimplementation, otherwise this behavior might have been made the default.- Overrides:
onRequestFocusInDescendantsin classandroid.view.ViewGroup
-
requestChildRectangleOnScreen
public boolean requestChildRectangleOnScreen(android.view.View child, android.graphics.Rect rectangle, boolean immediate)- Specified by:
requestChildRectangleOnScreenin interfaceandroid.view.ViewParent- Overrides:
requestChildRectangleOnScreenin classandroid.view.ViewGroup
-
requestLayout
public void requestLayout()
- Specified by:
requestLayoutin interfaceandroid.view.ViewParent- Overrides:
requestLayoutin classandroid.view.View
-
onLayout
protected void onLayout(boolean changed, int l, int t, int r, int b)- Overrides:
onLayoutin classandroid.widget.FrameLayout
-
onAttachedToWindow
public void onAttachedToWindow()
- Overrides:
onAttachedToWindowin classandroid.view.ViewGroup
-
onSizeChanged
protected void onSizeChanged(int w, int h, int oldw, int oldh)- Overrides:
onSizeChangedin classandroid.view.View
-
fling
public void fling(int velocityY)
Fling the scroll view- Parameters:
velocityY- The initial velocity in the Y direction. Positive numbers mean that the finger/cursor is moving down the screen, which means we want to scroll towards the top.
-
scrollTo
public void scrollTo(int x, int y)This version also clamps the scrolling to the bounds of our child.
- Overrides:
scrollToin classandroid.view.View
-
draw
public void draw(android.graphics.Canvas canvas)
- Overrides:
drawin classandroid.view.View
-
onRestoreInstanceState
protected void onRestoreInstanceState(android.os.Parcelable state)
- Overrides:
onRestoreInstanceStatein classandroid.view.View
-
onSaveInstanceState
protected android.os.Parcelable onSaveInstanceState()
- Overrides:
onSaveInstanceStatein classandroid.view.View
-
-