public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView> implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView>
ReactScrollView components.
Note that ReactScrollView and ReactHorizontalScrollView are exposed to JS as a
single ScrollView component, configured via the horizontal boolean property.
NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REACT_CLASS |
sStateDescriptionMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactScrollViewManager() |
ReactScrollViewManager(FpsListener fpsListener) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
createExportedCustomDirectEventTypeConstants() |
ReactScrollView |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
void |
flashScrollIndicators(ReactScrollView scrollView) |
java.util.Map<java.lang.String,java.lang.Integer> |
getCommandsMap()
Subclasses of
ViewManager that expect to receive commands through UIManagerModule.dispatchViewManagerCommand(int, com.facebook.react.bridge.Dynamic, com.facebook.react.bridge.ReadableArray) should override this method returning the map
between names of the commands and IDs that are then used in ViewManager.receiveCommand(T, int, com.facebook.react.bridge.ReadableArray) method
whenever the command is dispatched for this particular ViewManager. |
java.util.Map<java.lang.String,java.lang.Object> |
getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed on
native views.
|
java.lang.String |
getName() |
void |
receiveCommand(ReactScrollView scrollView,
int commandId,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
receiveCommand(ReactScrollView scrollView,
java.lang.String commandId,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
scrollTo(ReactScrollView scrollView,
ReactScrollViewCommandHelper.ScrollToCommandData data) |
void |
scrollToEnd(ReactScrollView scrollView,
ReactScrollViewCommandHelper.ScrollToEndCommandData data) |
void |
setBorderColor(ReactScrollView view,
int index,
java.lang.Integer color) |
void |
setBorderRadius(ReactScrollView view,
int index,
float borderRadius) |
void |
setBorderStyle(ReactScrollView view,
java.lang.String borderStyle) |
void |
setBorderWidth(ReactScrollView view,
int index,
float width) |
void |
setBottomFillColor(ReactScrollView view,
int color)
When set, fills the rest of the scrollview with a color to avoid setting a background and
creating unnecessary overdraw.
|
void |
setDecelerationRate(ReactScrollView view,
float decelerationRate) |
void |
setNestedScrollEnabled(ReactScrollView view,
boolean value) |
void |
setOverflow(ReactScrollView view,
java.lang.String overflow) |
void |
setOverScrollMode(ReactScrollView view,
java.lang.String value)
Controls overScroll behaviour
|
void |
setPagingEnabled(ReactScrollView view,
boolean pagingEnabled) |
void |
setPersistentScrollbar(ReactScrollView view,
boolean value) |
void |
setRemoveClippedSubviews(ReactScrollView view,
boolean removeClippedSubviews) |
void |
setScrollEnabled(ReactScrollView view,
boolean value) |
void |
setScrollPerfTag(ReactScrollView view,
java.lang.String scrollPerfTag)
Tag used for logging scroll performance on this scroll view.
|
void |
setSendMomentumEvents(ReactScrollView view,
boolean sendMomentumEvents)
Computing momentum events is potentially expensive since we post a runnable on the UI thread to
see when it is done.
|
void |
setShowsVerticalScrollIndicator(ReactScrollView view,
boolean value) |
void |
setSnapToEnd(ReactScrollView view,
boolean snapToEnd) |
void |
setSnapToInterval(ReactScrollView view,
float snapToInterval) |
void |
setSnapToOffsets(ReactScrollView view,
ReadableArray snapToOffsets) |
void |
setSnapToStart(ReactScrollView view,
boolean snapToStart) |
addView, addViews, createShadowNodeInstance, getChildAt, getChildCount, getShadowNodeClass, getViewZIndex, needsCustomLayoutForChildren, removeAllViews, removeView, removeViewAt, setViewZIndex, shouldPromoteGrandchildren, updateExtraDataonAfterUpdateTransaction, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setViewStates, setZIndexaddEventEmitters, createShadowNodeInstance, createView, createViewInstance, getDelegate, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, measure, onDropViewInstance, updateLocalData, updateProperties, updateStatecanOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroypublic static final java.lang.String REACT_CLASS
public ReactScrollViewManager()
public ReactScrollViewManager(FpsListener fpsListener)
public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ReactScrollView,LayoutShadowNode>public ReactScrollView createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<ReactScrollView,LayoutShadowNode>public void setScrollEnabled(ReactScrollView view, boolean value)
public void setShowsVerticalScrollIndicator(ReactScrollView view, boolean value)
public void setDecelerationRate(ReactScrollView view, float decelerationRate)
public void setSnapToInterval(ReactScrollView view, float snapToInterval)
public void setSnapToOffsets(ReactScrollView view, ReadableArray snapToOffsets)
public void setSnapToStart(ReactScrollView view, boolean snapToStart)
public void setSnapToEnd(ReactScrollView view, boolean snapToEnd)
public void setRemoveClippedSubviews(ReactScrollView view, boolean removeClippedSubviews)
public void setSendMomentumEvents(ReactScrollView view, boolean sendMomentumEvents)
view - sendMomentumEvents - public void setScrollPerfTag(ReactScrollView view, java.lang.String scrollPerfTag)
view - scrollPerfTag - public void setPagingEnabled(ReactScrollView view, boolean pagingEnabled)
public void setBottomFillColor(ReactScrollView view, int color)
view - color - public void setOverScrollMode(ReactScrollView view, java.lang.String value)
public void setNestedScrollEnabled(ReactScrollView view, boolean value)
public java.util.Map<java.lang.String,java.lang.Integer> getCommandsMap()
ViewManagerViewManager that expect to receive commands through UIManagerModule.dispatchViewManagerCommand(int, com.facebook.react.bridge.Dynamic, com.facebook.react.bridge.ReadableArray) should override this method returning the map
between names of the commands and IDs that are then used in ViewManager.receiveCommand(T, int, com.facebook.react.bridge.ReadableArray) method
whenever the command is dispatched for this particular ViewManager.getCommandsMap in class ViewManager<ReactScrollView,LayoutShadowNode>public void receiveCommand(ReactScrollView scrollView, int commandId, ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with coordinates
for a ScrollView instance.
This method is deprecated use ViewManager.receiveCommand(View, String, ReadableArray) instead.
receiveCommand in class ViewManager<ReactScrollView,LayoutShadowNode>scrollView - View instance that should receive the commandcommandId - code of the commandargs - optional arguments for the commandpublic void receiveCommand(ReactScrollView scrollView, java.lang.String commandId, ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with coordinates
for a ReactScrollView instance.receiveCommand in class ViewManager<ReactScrollView,LayoutShadowNode>scrollView - View instance that should receive the commandcommandId - code of the commandargs - optional arguments for the commandpublic void flashScrollIndicators(ReactScrollView scrollView)
flashScrollIndicators in interface ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView>public void scrollTo(ReactScrollView scrollView, ReactScrollViewCommandHelper.ScrollToCommandData data)
scrollTo in interface ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView>public void setBorderRadius(ReactScrollView view, int index, float borderRadius)
public void setBorderStyle(ReactScrollView view, java.lang.String borderStyle)
public void setBorderWidth(ReactScrollView view, int index, float width)
public void setBorderColor(ReactScrollView view, int index, java.lang.Integer color)
public void setOverflow(ReactScrollView view, java.lang.String overflow)
public void scrollToEnd(ReactScrollView scrollView, ReactScrollViewCommandHelper.ScrollToEndCommandData data)
scrollToEnd in interface ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView>public void setPersistentScrollbar(ReactScrollView view, boolean value)
public java.util.Map<java.lang.String,java.lang.Object> getExportedCustomDirectEventTypeConstants()
ViewManagerReturned map should be of the form:
{
"onTwirl": {
"registrationName": "onTwirl"
}
}
getExportedCustomDirectEventTypeConstants in class BaseViewManager<ReactScrollView,LayoutShadowNode>public static java.util.Map<java.lang.String,java.lang.Object> createExportedCustomDirectEventTypeConstants()