-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule
,com.facebook.react.uimanager.BaseViewManagerInterface
,com.facebook.react.uimanager.IViewManagerWithChildren
,com.facebook.react.views.scroll.ReactScrollViewCommandHelper.ScrollCommandHandler
public class ReactHorizontalScrollViewManager extends ViewGroupManager<ReactHorizontalScrollView> implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactHorizontalScrollView>
View manager for ReactHorizontalScrollView components.
Note that ReactScrollView and ReactHorizontalScrollView are exposed to JS as a single ScrollView component, configured via the
{@code horizontal}
boolean property.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
REACT_CLASS
-
Constructor Summary
Constructors Constructor Description ReactHorizontalScrollViewManager()
ReactHorizontalScrollViewManager(FpsListener fpsListener)
-
Method Summary
Modifier and Type Method Description String
getName()
ReactHorizontalScrollView
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type. Object
updateState(ReactHorizontalScrollView view, ReactStylesDiffMap props, @Nullable() StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances ofthis component type. void
setScrollEnabled(ReactHorizontalScrollView view, boolean value)
void
setShowsHorizontalScrollIndicator(ReactHorizontalScrollView view, boolean value)
void
setDecelerationRate(ReactHorizontalScrollView view, float decelerationRate)
void
setDisableIntervalMomentum(ReactHorizontalScrollView view, boolean disbaleIntervalMomentum)
void
setSnapToInterval(ReactHorizontalScrollView view, float snapToInterval)
void
setSnapToAlignment(ReactHorizontalScrollView view, String alignment)
void
setSnapToOffsets(ReactHorizontalScrollView view, @Nullable() ReadableArray snapToOffsets)
void
setSnapToStart(ReactHorizontalScrollView view, boolean snapToStart)
void
setSnapToEnd(ReactHorizontalScrollView view, boolean snapToEnd)
void
setRemoveClippedSubviews(ReactHorizontalScrollView view, boolean removeClippedSubviews)
void
setSendMomentumEvents(ReactHorizontalScrollView view, boolean sendMomentumEvents)
Computing momentum events is potentially expensive since we post a runnable on the UI thread tosee when it is done. void
setScrollPerfTag(ReactHorizontalScrollView view, String scrollPerfTag)
Tag used for logging scroll performance on this scroll view. void
setPagingEnabled(ReactHorizontalScrollView view, boolean pagingEnabled)
void
setOverScrollMode(ReactHorizontalScrollView view, String value)
Controls overScroll behaviour void
setNestedScrollEnabled(ReactHorizontalScrollView view, boolean value)
void
receiveCommand(ReactHorizontalScrollView scrollView, int commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . void
receiveCommand(ReactHorizontalScrollView scrollView, String commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . void
flashScrollIndicators(ReactHorizontalScrollView scrollView)
void
scrollTo(ReactHorizontalScrollView scrollView, ReactScrollViewCommandHelper.ScrollToCommandData data)
void
scrollToEnd(ReactHorizontalScrollView scrollView, ReactScrollViewCommandHelper.ScrollToEndCommandData data)
void
setBottomFillColor(ReactHorizontalScrollView view, int color)
When set, fills the rest of the scrollview with a color to avoid setting a background andcreating unnecessary overdraw. void
setBorderRadius(ReactHorizontalScrollView view, int index, float borderRadius)
void
setBorderStyle(ReactHorizontalScrollView view, @Nullable() String borderStyle)
void
setBorderWidth(ReactHorizontalScrollView view, int index, float width)
void
setBorderColor(ReactHorizontalScrollView view, int index, Integer color)
void
setOverflow(ReactHorizontalScrollView view, @Nullable() String overflow)
void
setPersistentScrollbar(ReactHorizontalScrollView view, boolean value)
void
setFadingEdgeLength(ReactHorizontalScrollView view, int value)
void
setContentOffset(ReactHorizontalScrollView view, ReadableMap value)
void
setPointerEvents(ReactHorizontalScrollView view, @Nullable() String pointerEventsStr)
void
setScrollEventThrottle(ReactHorizontalScrollView view, int scrollEventThrottle)
-
Methods inherited from class com.facebook.react.uimanager.ViewGroupManager
addView, addViews, createShadowNodeInstance, getChildAt, getChildCount, getShadowNodeClass, getViewZIndex, needsCustomLayoutForChildren, removeAllViews, removeView, removeViewAt, setViewZIndex, shouldPromoteGrandchildren, updateExtraData
-
Methods inherited from class com.facebook.react.uimanager.BaseViewManager
getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLabelledBy, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setMoveShouldSetResponder, setMoveShouldSetResponderCapture, setNativeId, setOpacity, setPointerEnter, setPointerLeave, setPointerMove, setRenderToHardwareTexture, setResponderEnd, setResponderGrant, setResponderMove, setResponderReject, setResponderRelease, setResponderStart, setResponderTerminate, setResponderTerminationRequest, setRotation, setScaleX, setScaleY, setShadowColor, setShouldBlockNativeResponder, setStartShouldSetResponder, setStartShouldSetResponderCapture, setTestId, setTouchCancel, setTouchEnd, setTouchMove, setTouchStart, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
-
Methods inherited from class com.facebook.react.uimanager.ViewManager
createShadowNodeInstance, createShadowNodeInstance, createView, getCommandsMap, getExportedViewConstants, getNativeProps, getShadowNodeClass, measure, measure, onDropViewInstance, receiveCommand, receiveCommand, setPadding, updateExtraData, updateProperties, updateState
-
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
-
Methods inherited from class com.facebook.react.uimanager.BaseViewManagerInterface
setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLabelledBy, setAccessibilityLiveRegion, setAccessibilityRole, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setShadowColor, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
-
Methods inherited from class com.facebook.react.views.scroll.ReactScrollViewCommandHelper.ScrollCommandHandler
flashScrollIndicators, scrollTo, scrollToEnd
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ReactHorizontalScrollViewManager
ReactHorizontalScrollViewManager()
-
ReactHorizontalScrollViewManager
ReactHorizontalScrollViewManager(FpsListener fpsListener)
-
-
Method Detail
-
createViewInstance
ReactHorizontalScrollView createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
-
updateState
Object updateState(ReactHorizontalScrollView view, ReactStylesDiffMap props, @Nullable() StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances ofthis component type.
-
setScrollEnabled
void setScrollEnabled(ReactHorizontalScrollView view, boolean value)
-
setShowsHorizontalScrollIndicator
void setShowsHorizontalScrollIndicator(ReactHorizontalScrollView view, boolean value)
-
setDecelerationRate
void setDecelerationRate(ReactHorizontalScrollView view, float decelerationRate)
-
setDisableIntervalMomentum
void setDisableIntervalMomentum(ReactHorizontalScrollView view, boolean disbaleIntervalMomentum)
-
setSnapToInterval
void setSnapToInterval(ReactHorizontalScrollView view, float snapToInterval)
-
setSnapToAlignment
void setSnapToAlignment(ReactHorizontalScrollView view, String alignment)
-
setSnapToOffsets
void setSnapToOffsets(ReactHorizontalScrollView view, @Nullable() ReadableArray snapToOffsets)
-
setSnapToStart
void setSnapToStart(ReactHorizontalScrollView view, boolean snapToStart)
-
setSnapToEnd
void setSnapToEnd(ReactHorizontalScrollView view, boolean snapToEnd)
-
setRemoveClippedSubviews
void setRemoveClippedSubviews(ReactHorizontalScrollView view, boolean removeClippedSubviews)
-
setSendMomentumEvents
void setSendMomentumEvents(ReactHorizontalScrollView view, boolean sendMomentumEvents)
Computing momentum events is potentially expensive since we post a runnable on the UI thread tosee when it is done. We only do that if {@param sendMomentumEvents} is set to true. This ishandled automatically in js by checking if there is a listener on the momentum events.
-
setScrollPerfTag
void setScrollPerfTag(ReactHorizontalScrollView view, String scrollPerfTag)
Tag used for logging scroll performance on this scroll view. Will force momentum events to beturned on (see setSendMomentumEvents).
-
setPagingEnabled
void setPagingEnabled(ReactHorizontalScrollView view, boolean pagingEnabled)
-
setOverScrollMode
void setOverScrollMode(ReactHorizontalScrollView view, String value)
Controls overScroll behaviour
-
setNestedScrollEnabled
void setNestedScrollEnabled(ReactHorizontalScrollView view, boolean value)
-
receiveCommand
void receiveCommand(ReactHorizontalScrollView scrollView, int commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . Good example of such a command would be
{@code scrollTo}
request with coordinatesfor a ScrollView instance.This method is deprecated use receiveCommand instead.
- Parameters:
commandId
- code of the commandargs
- optional arguments for the command
-
receiveCommand
void receiveCommand(ReactHorizontalScrollView scrollView, String commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . Good example of such a command would be
{@code scrollTo}
request with coordinatesfor a ReactScrollView instance.- Parameters:
commandId
- code of the commandargs
- optional arguments for the command
-
flashScrollIndicators
void flashScrollIndicators(ReactHorizontalScrollView scrollView)
-
scrollTo
void scrollTo(ReactHorizontalScrollView scrollView, ReactScrollViewCommandHelper.ScrollToCommandData data)
-
scrollToEnd
void scrollToEnd(ReactHorizontalScrollView scrollView, ReactScrollViewCommandHelper.ScrollToEndCommandData data)
-
setBottomFillColor
void setBottomFillColor(ReactHorizontalScrollView view, int color)
When set, fills the rest of the scrollview with a color to avoid setting a background andcreating unnecessary overdraw.
-
setBorderRadius
void setBorderRadius(ReactHorizontalScrollView view, int index, float borderRadius)
-
setBorderStyle
void setBorderStyle(ReactHorizontalScrollView view, @Nullable() String borderStyle)
-
setBorderWidth
void setBorderWidth(ReactHorizontalScrollView view, int index, float width)
-
setBorderColor
void setBorderColor(ReactHorizontalScrollView view, int index, Integer color)
-
setOverflow
void setOverflow(ReactHorizontalScrollView view, @Nullable() String overflow)
-
setPersistentScrollbar
void setPersistentScrollbar(ReactHorizontalScrollView view, boolean value)
-
setFadingEdgeLength
void setFadingEdgeLength(ReactHorizontalScrollView view, int value)
-
setContentOffset
void setContentOffset(ReactHorizontalScrollView view, ReadableMap value)
-
setPointerEvents
void setPointerEvents(ReactHorizontalScrollView view, @Nullable() String pointerEventsStr)
-
setScrollEventThrottle
void setScrollEventThrottle(ReactHorizontalScrollView view, int scrollEventThrottle)
-
-
-
-