public class ReactSwitchManager extends SimpleViewManager<com.facebook.react.views.switchview.ReactSwitch>
ReactSwitch
components.NativeModule.NativeMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REACT_CLASS |
PROP_NATIVE_ID, PROP_TEST_ID
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC
Constructor and Description |
---|
ReactSwitchManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addEventEmitters(ThemedReactContext reactContext,
com.facebook.react.views.switchview.ReactSwitch view)
Subclasses can override this method to install custom event emitters on the given View.
|
LayoutShadowNode |
createShadowNodeInstance()
This method should return a subclass of
ReactShadowNode which will be then used for
measuring position and size of the view. |
protected com.facebook.react.views.switchview.ReactSwitch |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
java.lang.String |
getName() |
java.lang.Class |
getShadowNodeClass()
This method should return
Class instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance() . |
void |
setDisabled(com.facebook.react.views.switchview.ReactSwitch view,
boolean disabled) |
void |
setEnabled(com.facebook.react.views.switchview.ReactSwitch view,
boolean enabled) |
void |
setOn(com.facebook.react.views.switchview.ReactSwitch view,
boolean on) |
void |
setThumbColor(com.facebook.react.views.switchview.ReactSwitch view,
java.lang.Integer color) |
void |
setThumbTintColor(com.facebook.react.views.switchview.ReactSwitch view,
java.lang.Integer color) |
void |
setTrackColorForFalse(com.facebook.react.views.switchview.ReactSwitch view,
java.lang.Integer color) |
void |
setTrackColorForTrue(com.facebook.react.views.switchview.ReactSwitch view,
java.lang.Integer color) |
void |
setTrackTintColor(com.facebook.react.views.switchview.ReactSwitch view,
java.lang.Integer color) |
void |
setValue(com.facebook.react.views.switchview.ReactSwitch view,
boolean value) |
updateExtraData
onAfterUpdateTransaction, setAccessibilityComponentType, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewStates, setZIndex
createShadowNodeInstance, createView, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getNativeProps, measure, onDropViewInstance, receiveCommand, updateLocalData, updateProperties
canOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroy
public static final java.lang.String REACT_CLASS
public java.lang.String getName()
getName
in interface NativeModule
getName
in class ViewManager<com.facebook.react.views.switchview.ReactSwitch,LayoutShadowNode>
public LayoutShadowNode createShadowNodeInstance()
ViewManager
ReactShadowNode
which will be then used for
measuring position and size of the view. In most of the cases this should just return an
instance of ReactShadowNode
createShadowNodeInstance
in class SimpleViewManager<com.facebook.react.views.switchview.ReactSwitch>
public java.lang.Class getShadowNodeClass()
ViewManager
Class
instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance()
.
This method will be used in the bridge initialization phase to collect properties exposed using
ReactProp
(or ReactPropGroup
) annotation from the ReactShadowNode
subclass specific for native view this manager provides.getShadowNodeClass
in class SimpleViewManager<com.facebook.react.views.switchview.ReactSwitch>
Class
object that represents type of shadow node used by this view manager.protected com.facebook.react.views.switchview.ReactSwitch createViewInstance(ThemedReactContext context)
ViewManager
createViewInstance
in class ViewManager<com.facebook.react.views.switchview.ReactSwitch,LayoutShadowNode>
public void setDisabled(com.facebook.react.views.switchview.ReactSwitch view, boolean disabled)
public void setEnabled(com.facebook.react.views.switchview.ReactSwitch view, boolean enabled)
public void setOn(com.facebook.react.views.switchview.ReactSwitch view, boolean on)
public void setValue(com.facebook.react.views.switchview.ReactSwitch view, boolean value)
public void setThumbTintColor(com.facebook.react.views.switchview.ReactSwitch view, java.lang.Integer color)
public void setThumbColor(com.facebook.react.views.switchview.ReactSwitch view, java.lang.Integer color)
public void setTrackColorForFalse(com.facebook.react.views.switchview.ReactSwitch view, java.lang.Integer color)
public void setTrackColorForTrue(com.facebook.react.views.switchview.ReactSwitch view, java.lang.Integer color)
public void setTrackTintColor(com.facebook.react.views.switchview.ReactSwitch view, java.lang.Integer color)
protected void addEventEmitters(ThemedReactContext reactContext, com.facebook.react.views.switchview.ReactSwitch view)
ViewManager
addEventEmitters
in class ViewManager<com.facebook.react.views.switchview.ReactSwitch,LayoutShadowNode>