-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,com.facebook.react.uimanager.FabricViewStateManager.HasFabricViewStateManager,com.facebook.react.uimanager.ReactClippingViewGroup,com.facebook.react.uimanager.ReactOverflowView,com.facebook.react.uimanager.ReactOverflowViewWithInset,com.facebook.react.views.scroll.ReactScrollViewHelper.HasFlingAnimator,com.facebook.react.views.scroll.ReactScrollViewHelper.HasScrollEventThrottle,com.facebook.react.views.scroll.ReactScrollViewHelper.HasScrollState
public class ReactHorizontalScrollView extends HorizontalScrollView implements ReactClippingViewGroup, FabricViewStateManager.HasFabricViewStateManager, ReactOverflowViewWithInset, ReactScrollViewHelper.HasScrollState, ReactScrollViewHelper.HasFlingAnimator, ReactScrollViewHelper.HasScrollEventThrottle
Similar to ReactScrollView but only supports horizontal scrolling.
-
-
Constructor Summary
Constructors Constructor Description ReactHorizontalScrollView(Context context)ReactHorizontalScrollView(Context context, FpsListener fpsListener)
-
Method Summary
Modifier and Type Method Description voidsetScrollPerfTag(@Nullable() String scrollPerfTag)voidsetRemoveClippedSubviews(boolean removeClippedSubviews)Sets property {@code removeClippedSubviews}as a result of property update in JS.booleangetRemoveClippedSubviews()Get the current value of {@code removeClippedSubviews}property.voidsetDisableIntervalMomentum(boolean disableIntervalMomentum)voidsetSendMomentumEvents(boolean sendMomentumEvents)voidsetScrollEnabled(boolean scrollEnabled)voidsetPagingEnabled(boolean pagingEnabled)voidsetDecelerationRate(float decelerationRate)voidsetSnapInterval(int snapInterval)voidsetSnapOffsets(List<Integer> snapOffsets)voidsetSnapToStart(boolean snapToStart)voidsetSnapToEnd(boolean snapToEnd)voidsetSnapToAlignment(int snapToAlignment)voidflashScrollIndicators()voidsetOverflow(String overflow)StringgetOverflow()Gets the overflow state of a view. voidsetOverflowInset(int left, int top, int right, int bottom)Set the overflow inset rect values which indicate the extensions to the boundaries of currentview that wraps all of its children views RectgetOverflowInset()Get the overflow inset rect values which indicate the extensions to the boundaries of currentview that wraps all of its children views voidrequestChildFocus(View child, View focused)Since ReactHorizontalScrollView handles layout changes on JS side, it does not callsuper.onlayout due to which mIsLayoutDirty flag in HorizontalScrollView remains true andprevents scrolling to child when requestChildFocus is called. voidaddFocusables(ArrayList<View> views, int direction, int focusableMode)booleanonInterceptTouchEvent(MotionEvent ev)booleanpageScroll(int direction)booleanarrowScroll(int direction)booleanonTouchEvent(MotionEvent ev)booleanexecuteKeyEvent(KeyEvent event)voidfling(int velocityX)voidupdateClippingRect()Notify view that clipping area may have changed and it should recalculate the list of childrenthat should be attached/detached. voidgetClippingRect(Rect outClippingRect)Get rectangular bounds to which view is currently clipped to. booleangetChildVisibleRect(View child, Rect r, Point offset)voidsetEndFillColor(int color)voiddraw(Canvas canvas)voidsetBackgroundColor(int color)voidsetBorderWidth(int position, float width)voidsetBorderColor(int position, float color, float alpha)voidsetBorderRadius(float borderRadius)voidsetBorderRadius(float borderRadius, int position)voidsetBorderStyle(@Nullable() String style)voidreactSmoothScrollTo(int x, int y)Calls `smoothScrollTo` and updates state. voidscrollTo(int x, int y)Calls `super.scrollTo` and updates state. FabricViewStateManagergetFabricViewStateManager()ReactScrollViewHelper.ReactScrollViewScrollStategetReactScrollViewScrollState()Get the scroll state for the current ScrollView voidstartFlingAnimator(int start, int end)Start the fling animator that the ScrollView has to go from the start position to endposition. ValueAnimatorgetFlingAnimator()Get the fling animator that is reused for the ScrollView to handle fling animation. intgetFlingExtrapolatedDistance(int velocityX)Get the fling distance with current velocity for prediction voidsetPointerEvents(PointerEvents pointerEvents)PointerEventsgetPointerEvents()voidsetScrollEventThrottle(int scrollEventThrottle)Set the scroll event throttle in ms. intgetScrollEventThrottle()Get the scroll event throttle in ms. voidsetLastScrollDispatchTime(long lastScrollDispatchTime)Set the scroll view's last dispatch time for throttling longgetLastScrollDispatchTime()Get the scroll view dispatch time for throttling -
Methods inherited from class android.widget.HorizontalScrollView
addView, arrowScroll, computeScroll, dispatchKeyEvent, draw, executeKeyEvent, fling, fullScroll, getAccessibilityClassName, getLeftEdgeEffectColor, getMaxScrollAmount, getRightEdgeEffectColor, isFillViewport, isSmoothScrollingEnabled, onGenericMotionEvent, onInterceptTouchEvent, onTouchEvent, pageScroll, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestLayout, scrollTo, setEdgeEffectColor, setFillViewport, setLeftEdgeEffectColor, setRightEdgeEffectColor, setSmoothScrollingEnabled, shouldDelayChildPressedState, smoothScrollBy, smoothScrollTo -
Methods inherited from class android.widget.FrameLayout
generateLayoutParams, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren -
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout -
Methods inherited from class android.view.View
addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, bringToFront, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, drawableHotspotChanged, findViewById, findViewWithTag, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, 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, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocusFromTouch, requestPointerCapture, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, 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, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class com.facebook.react.views.scroll.ReactScrollViewHelper.HasFlingAnimator
getFlingExtrapolatedDistance -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ReactHorizontalScrollView
ReactHorizontalScrollView(Context context)
-
ReactHorizontalScrollView
ReactHorizontalScrollView(Context context, FpsListener fpsListener)
-
-
Method Detail
-
setScrollPerfTag
void setScrollPerfTag(@Nullable() String scrollPerfTag)
-
setRemoveClippedSubviews
void setRemoveClippedSubviews(boolean removeClippedSubviews)
Sets property
{@code removeClippedSubviews}as a result of property update in JS. Should becalled only from @{link ViewManager#updateView} method.Helper method applyRemoveClippedSubviewsProperty may beused by ViewManager subclass to apply this property based on property update map .
-
getRemoveClippedSubviews
boolean getRemoveClippedSubviews()
Get the current value of
{@code removeClippedSubviews}property.
-
setDisableIntervalMomentum
void setDisableIntervalMomentum(boolean disableIntervalMomentum)
-
setSendMomentumEvents
void setSendMomentumEvents(boolean sendMomentumEvents)
-
setScrollEnabled
void setScrollEnabled(boolean scrollEnabled)
-
setPagingEnabled
void setPagingEnabled(boolean pagingEnabled)
-
setDecelerationRate
void setDecelerationRate(float decelerationRate)
-
setSnapInterval
void setSnapInterval(int snapInterval)
-
setSnapOffsets
void setSnapOffsets(List<Integer> snapOffsets)
-
setSnapToStart
void setSnapToStart(boolean snapToStart)
-
setSnapToEnd
void setSnapToEnd(boolean snapToEnd)
-
setSnapToAlignment
void setSnapToAlignment(int snapToAlignment)
-
flashScrollIndicators
void flashScrollIndicators()
-
setOverflow
void setOverflow(String overflow)
-
getOverflow
@Nullable() String getOverflow()
-
setOverflowInset
void setOverflowInset(int left, int top, int right, int bottom)
Set the overflow inset rect values which indicate the extensions to the boundaries of currentview that wraps all of its children views
-
getOverflowInset
Rect getOverflowInset()
Get the overflow inset rect values which indicate the extensions to the boundaries of currentview that wraps all of its children views
-
requestChildFocus
void requestChildFocus(View child, View focused)
Since ReactHorizontalScrollView handles layout changes on JS side, it does not callsuper.onlayout due to which mIsLayoutDirty flag in HorizontalScrollView remains true andprevents scrolling to child when requestChildFocus is called. Overriding this method andscrolling to child without checking any layout dirty flag. This will fix focus navigation issuefor KeyEvents which are not handled in HorizontalScrollView, for example: KEYCODE_TAB.
-
addFocusables
void addFocusables(ArrayList<View> views, int direction, int focusableMode)
-
onInterceptTouchEvent
boolean onInterceptTouchEvent(MotionEvent ev)
-
pageScroll
boolean pageScroll(int direction)
-
arrowScroll
boolean arrowScroll(int direction)
-
onTouchEvent
boolean onTouchEvent(MotionEvent ev)
-
executeKeyEvent
boolean executeKeyEvent(KeyEvent event)
-
fling
void fling(int velocityX)
-
updateClippingRect
void updateClippingRect()
Notify view that clipping area may have changed and it should recalculate the list of childrenthat should be attached/detached. This method should be called only when property
{@code * removeClippedSubviews}is set to{@code true}on a view.CAUTION: Views are responsible for calling updateClippingRect on it's children.This should happen if child implement ReactClippingViewGroup, return true from and clipping rect change of the current view may affect clippingrect of this child.
-
getClippingRect
void getClippingRect(Rect outClippingRect)
Get rectangular bounds to which view is currently clipped to. Called only on views that has set
{@code removeCLippedSubviews}property value to{@code true}.- Parameters:
outClippingRect- output clipping rect should be written to this object.
-
getChildVisibleRect
boolean getChildVisibleRect(View child, Rect r, Point offset)
-
setEndFillColor
void setEndFillColor(int color)
-
setBackgroundColor
void setBackgroundColor(int color)
-
setBorderWidth
void setBorderWidth(int position, float width)
-
setBorderColor
void setBorderColor(int position, float color, float alpha)
-
setBorderRadius
void setBorderRadius(float borderRadius)
-
setBorderRadius
void setBorderRadius(float borderRadius, int position)
-
setBorderStyle
void setBorderStyle(@Nullable() String style)
-
reactSmoothScrollTo
void reactSmoothScrollTo(int x, int y)
Calls `smoothScrollTo` and updates state.
`smoothScrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync betweenscroll view and state. Calling raw `smoothScrollTo` doesn't update state.
-
scrollTo
void scrollTo(int x, int y)
Calls `super.scrollTo` and updates state.
`super.scrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync betweenscroll view and state.
Note that while we can override scrollTo, we *cannot* override `smoothScrollTo` because itis final. See `reactSmoothScrollTo`.
-
getFabricViewStateManager
FabricViewStateManager getFabricViewStateManager()
-
getReactScrollViewScrollState
ReactScrollViewHelper.ReactScrollViewScrollState getReactScrollViewScrollState()
Get the scroll state for the current ScrollView
-
startFlingAnimator
void startFlingAnimator(int start, int end)
Start the fling animator that the ScrollView has to go from the start position to endposition.
-
getFlingAnimator
ValueAnimator getFlingAnimator()
Get the fling animator that is reused for the ScrollView to handle fling animation.
-
getFlingExtrapolatedDistance
int getFlingExtrapolatedDistance(int velocityX)
Get the fling distance with current velocity for prediction
-
setPointerEvents
void setPointerEvents(PointerEvents pointerEvents)
-
getPointerEvents
PointerEvents getPointerEvents()
-
setScrollEventThrottle
void setScrollEventThrottle(int scrollEventThrottle)
Set the scroll event throttle in ms. This number is used to throttle the scroll events. Thedefault value is zero, which means the scroll events are sent with no throttle.
-
getScrollEventThrottle
int getScrollEventThrottle()
Get the scroll event throttle in ms.
-
setLastScrollDispatchTime
void setLastScrollDispatchTime(long lastScrollDispatchTime)
Set the scroll view's last dispatch time for throttling
-
getLastScrollDispatchTime
long getLastScrollDispatchTime()
Get the scroll view dispatch time for throttling
-
-
-
-