-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule
,com.facebook.react.uimanager.BaseViewManagerInterface
,com.facebook.react.uimanager.IViewManagerWithChildren
,com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface
public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefreshLayout> implements AndroidSwipeRefreshLayoutManagerInterface<ReactSwipeRefreshLayout>
ViewManager for ReactSwipeRefreshLayout which allows the user to "pull to refresh" a child view. Emits an
{@code onRefresh}
event when this happens.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
REACT_CLASS
-
Constructor Summary
Constructors Constructor Description SwipeRefreshLayoutManager()
-
Method Summary
Modifier and Type Method Description String
getName()
void
setEnabled(ReactSwipeRefreshLayout view, boolean enabled)
void
setColors(ReactSwipeRefreshLayout view, @Nullable() ReadableArray colors)
void
setProgressBackgroundColor(ReactSwipeRefreshLayout view, Integer color)
void
setSize(ReactSwipeRefreshLayout view, int value)
void
setSize(ReactSwipeRefreshLayout view, String size)
void
setSize(ReactSwipeRefreshLayout view, Dynamic size)
void
setRefreshing(ReactSwipeRefreshLayout view, boolean refreshing)
void
setProgressViewOffset(ReactSwipeRefreshLayout view, float offset)
void
setNativeRefreshing(ReactSwipeRefreshLayout view, boolean value)
void
receiveCommand(@NonNull() ReactSwipeRefreshLayout root, String commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . Map<String, Object>
getExportedViewConstants()
Returns a map of view-specific constants that are injected to JavaScript. Map<String, Object>
getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed onnative views. -
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, 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, 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.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface
setColors, setEnabled, setNativeRefreshing, setProgressBackgroundColor, setProgressViewOffset, setRefreshing, setSize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setEnabled
void setEnabled(ReactSwipeRefreshLayout view, boolean enabled)
-
setColors
void setColors(ReactSwipeRefreshLayout view, @Nullable() ReadableArray colors)
-
setProgressBackgroundColor
void setProgressBackgroundColor(ReactSwipeRefreshLayout view, Integer color)
-
setSize
void setSize(ReactSwipeRefreshLayout view, int value)
-
setSize
void setSize(ReactSwipeRefreshLayout view, String size)
-
setSize
void setSize(ReactSwipeRefreshLayout view, Dynamic size)
-
setRefreshing
void setRefreshing(ReactSwipeRefreshLayout view, boolean refreshing)
-
setProgressViewOffset
void setProgressViewOffset(ReactSwipeRefreshLayout view, float offset)
-
setNativeRefreshing
void setNativeRefreshing(ReactSwipeRefreshLayout view, boolean value)
-
receiveCommand
void receiveCommand(@NonNull() ReactSwipeRefreshLayout root, 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:
root
- View instance that should receive the commandcommandId
- code of the commandargs
- optional arguments for the command
-
getExportedViewConstants
@Nullable() Map<String, Object> getExportedViewConstants()
Returns a map of view-specific constants that are injected to JavaScript. These constants aremade accessible via UIManager..Constants.
-
getExportedCustomDirectEventTypeConstants
Map<String, Object> getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed onnative views. This should return non-bubbling directly-dispatched event types.
Returned map should be of the form:
{ "onTwirl": { "registrationName": "onTwirl" } }
-
-
-
-