public class ReactViewPagerManager extends ViewGroupManager<ReactViewPager> implements AndroidViewPagerManagerInterface<ReactViewPager>
ViewManager that provides native ViewPager view.NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static int |
COMMAND_SET_PAGE |
static int |
COMMAND_SET_PAGE_WITHOUT_ANIMATION |
static java.lang.String |
REACT_CLASS |
sStateDescriptionMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactViewPagerManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(ReactViewPager parent,
android.view.View child,
int index) |
protected ReactViewPager |
createViewInstance(ThemedReactContext reactContext)
Subclasses should return a new View instance of the proper type.
|
android.view.View |
getChildAt(ReactViewPager parent,
int index) |
int |
getChildCount(ReactViewPager parent) |
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. |
ViewManagerDelegate<ReactViewPager> |
getDelegate()
Override this method and return an instance of
ViewManagerDelegate if the props of the
view managed by this view manager should be set via this delegate. |
java.util.Map |
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() |
boolean |
needsCustomLayoutForChildren()
Returns whether this View type needs to handle laying out its own children instead of deferring
to the standard css-layout algorithm.
|
void |
receiveCommand(ReactViewPager viewPager,
int commandType,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
receiveCommand(ReactViewPager viewPager,
java.lang.String commandType,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
removeViewAt(ReactViewPager parent,
int index) |
void |
setInitialPage(ReactViewPager view,
int value) |
void |
setKeyboardDismissMode(ReactViewPager view,
java.lang.String value) |
void |
setPage(ReactViewPager view,
int page) |
void |
setPageMargin(ReactViewPager pager,
int margin) |
void |
setPageWithoutAnimation(ReactViewPager view,
int page) |
void |
setPeekEnabled(ReactViewPager pager,
boolean peekEnabled) |
void |
setScrollEnabled(ReactViewPager viewPager,
boolean value) |
addViews, createShadowNodeInstance, getShadowNodeClass, getViewZIndex, removeAllViews, removeView, setViewZIndex, shouldPromoteGrandchildren, updateExtraDataonAfterUpdateTransaction, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndexaddEventEmitters, createShadowNodeInstance, createView, createViewInstance, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, measure, onDropViewInstance, setPadding, updateLocalData, updateProperties, updateStatecanOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroypublic static final java.lang.String REACT_CLASS
public static final int COMMAND_SET_PAGE
public static final int COMMAND_SET_PAGE_WITHOUT_ANIMATION
public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ReactViewPager,LayoutShadowNode>protected ReactViewPager createViewInstance(ThemedReactContext reactContext)
ViewManagercreateViewInstance in class ViewManager<ReactViewPager,LayoutShadowNode>public void setScrollEnabled(ReactViewPager viewPager, boolean value)
setScrollEnabled in interface AndroidViewPagerManagerInterface<ReactViewPager>public boolean needsCustomLayoutForChildren()
ViewGroupManagerneedsCustomLayoutForChildren in interface IViewManagerWithChildrenneedsCustomLayoutForChildren in class ViewGroupManager<ReactViewPager>public java.util.Map getExportedCustomDirectEventTypeConstants()
ViewManagerReturned map should be of the form:
{
"onTwirl": {
"registrationName": "onTwirl"
}
}
getExportedCustomDirectEventTypeConstants in class BaseViewManager<ReactViewPager,LayoutShadowNode>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<ReactViewPager,LayoutShadowNode>public void receiveCommand(ReactViewPager viewPager, int commandType, 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<ReactViewPager,LayoutShadowNode>viewPager - View instance that should receive the commandcommandType - code of the commandargs - optional arguments for the commandpublic void receiveCommand(ReactViewPager viewPager, java.lang.String commandType, ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with coordinates
for a ReactScrollView instance.receiveCommand in class ViewManager<ReactViewPager,LayoutShadowNode>viewPager - View instance that should receive the commandcommandType - code of the commandargs - optional arguments for the commandpublic void addView(ReactViewPager parent, android.view.View child, int index)
addView in class ViewGroupManager<ReactViewPager>public int getChildCount(ReactViewPager parent)
getChildCount in class ViewGroupManager<ReactViewPager>public android.view.View getChildAt(ReactViewPager parent, int index)
getChildAt in class ViewGroupManager<ReactViewPager>public void removeViewAt(ReactViewPager parent, int index)
removeViewAt in class ViewGroupManager<ReactViewPager>public void setPageMargin(ReactViewPager pager, int margin)
setPageMargin in interface AndroidViewPagerManagerInterface<ReactViewPager>public void setPeekEnabled(ReactViewPager pager, boolean peekEnabled)
setPeekEnabled in interface AndroidViewPagerManagerInterface<ReactViewPager>public void setInitialPage(ReactViewPager view, int value)
setInitialPage in interface AndroidViewPagerManagerInterface<ReactViewPager>public void setKeyboardDismissMode(ReactViewPager view, java.lang.String value)
setKeyboardDismissMode in interface AndroidViewPagerManagerInterface<ReactViewPager>public void setPage(ReactViewPager view, int page)
setPage in interface AndroidViewPagerManagerInterface<ReactViewPager>public void setPageWithoutAnimation(ReactViewPager view, int page)
setPageWithoutAnimation in interface AndroidViewPagerManagerInterface<ReactViewPager>public ViewManagerDelegate<ReactViewPager> getDelegate()
ViewManagerViewManagerDelegate if the props of the
view managed by this view manager should be set via this delegate. The provided instance will
then get calls to ViewManagerDelegate.setProperty(View, String, Object) for every prop
that must be updated and it's the delegate's responsibility to apply these values to the view.
By default this method returns null, which means that the view manager doesn't have
a delegate and the view props should be set internally by the view manager itself.
getDelegate in class ViewManager<ReactViewPager,LayoutShadowNode>ViewManagerDelegate if the props of the view managed by this
view manager should be set via this delegate