public class ReactTextInputManager extends ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_FONT_SIZE |
static java.lang.String |
PROP_TEST_ID |
static java.lang.String |
PROP_TEXT_ALIGN |
static java.lang.String |
PROP_TEXT_ALIGN_VERTICAL |
static java.lang.String |
PROP_TEXT_INPUT_AUTO_CAPITALIZE |
static java.lang.String |
PROP_TEXT_INPUT_AUTO_CORRECT |
static java.lang.String |
PROP_TEXT_INPUT_EDITABLE |
static java.lang.String |
PROP_TEXT_INPUT_HINT |
static java.lang.String |
PROP_TEXT_INPUT_HINT_COLOR |
static java.lang.String |
PROP_TEXT_INPUT_KEYBOARD_TYPE |
static java.lang.String |
PROP_TEXT_INPUT_MOST_RECENT_EVENT_COUNT |
static java.lang.String |
PROP_TEXT_INPUT_MULTILINE |
static java.lang.String |
PROP_TEXT_INPUT_NUMLINES |
static java.lang.String |
PROP_TEXT_INPUT_PASSWORD |
static java.lang.String |
PROP_TEXT_INPUT_TEXT |
static java.lang.String |
PROP_TEXT_INPUT_UNDERLINE_COLOR |
| Constructor and Description |
|---|
ReactTextInputManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEventEmitters(ThemedReactContext reactContext,
ReactEditText editText)
Subclasses can override this method to install custom event emitters on the given View.
|
com.facebook.react.views.textinput.ReactTextInputShadowNode |
createCSSNodeInstance()
This method should return a subclass of
CSSNode which will be then used for measuring
position and size of the view. |
ReactEditText |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getCommandsMap()
Subclasses of
ViewManager that expect to receive commands through
UIManagerModule.dispatchViewManagerCommand(int, int, 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> |
getExportedCustomBubblingEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed on
native views.
|
java.util.Map |
getExportedViewConstants()
Returns a map of view-specific constants that are injected to JavaScript.
|
java.lang.String |
getName() |
void |
receiveCommand(ReactEditText reactEditText,
int commandId,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
updateExtraData(ReactEditText view,
java.lang.Object extraData)
Subclasses can implement this method to receive an optional extra data enqueued from the
corresponding instance of
ReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue). |
void |
updateView(ReactEditText view,
CatalystStylesDiffMap props)
Subclass should use this method to populate native view with updated style properties.
|
createView, getExportedCustomDirectEventTypeConstants, getNativeProps, onAfterUpdateTransaction, onDropViewInstance, updatePropertiespublic static final java.lang.String PROP_TEXT_INPUT_TEXT
public static final java.lang.String PROP_TEXT_INPUT_MOST_RECENT_EVENT_COUNT
public static final java.lang.String PROP_FONT_SIZE
public static final java.lang.String PROP_TEXT_INPUT_AUTO_CORRECT
public static final java.lang.String PROP_TEXT_INPUT_AUTO_CAPITALIZE
public static final java.lang.String PROP_TEXT_ALIGN
public static final java.lang.String PROP_TEXT_ALIGN_VERTICAL
public static final java.lang.String PROP_TEXT_INPUT_HINT
public static final java.lang.String PROP_TEXT_INPUT_HINT_COLOR
public static final java.lang.String PROP_TEXT_INPUT_NUMLINES
public static final java.lang.String PROP_TEXT_INPUT_MULTILINE
public static final java.lang.String PROP_TEXT_INPUT_KEYBOARD_TYPE
public static final java.lang.String PROP_TEXT_INPUT_PASSWORD
public static final java.lang.String PROP_TEXT_INPUT_EDITABLE
public static final java.lang.String PROP_TEXT_INPUT_UNDERLINE_COLOR
public static final java.lang.String PROP_TEST_ID
public java.lang.String getName()
getName in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>public ReactEditText createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>public com.facebook.react.views.textinput.ReactTextInputShadowNode createCSSNodeInstance()
ViewManagerCSSNode which will be then used for measuring
position and size of the view. In mose of the cases this should just return an instance of
CSSNodecreateCSSNodeInstance in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>@Nullable public java.util.Map<java.lang.String,java.lang.Object> getExportedCustomBubblingEventTypeConstants()
ViewManagergetExportedCustomBubblingEventTypeConstants in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>@Nullable public java.util.Map<java.lang.String,java.lang.Integer> getCommandsMap()
ViewManagerViewManager that expect to receive commands through
UIManagerModule.dispatchViewManagerCommand(int, int, 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.
As an example we may consider ReactWebViewManager that expose the following commands:
goBack, goForward, reload. In this case the map returned from ViewManager.getCommandsMap() from
ReactWebViewManager will look as follows:
{
"goBack": 1,
"goForward": 2,
"reload": 3,
}
Now assuming that "reload" command is dispatched through UIManagerModule we trigger
ReactWebViewManager#receiveCommand passing "3" as commandId argument.getCommandsMap in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>public void receiveCommand(ReactEditText reactEditText, int commandId, @Nullable ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with
coordinates for a ScrollView or goBack request for a WebView instance.receiveCommand in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>reactEditText - View instance that should receive the commandcommandId - code of the commandargs - optional arguments for the commandpublic void updateExtraData(ReactEditText view, java.lang.Object extraData)
ViewManagerReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue).
Since css layout step and ui updates can be executed in separate thread apart of setting
x/y/width/height this is the recommended and thread-safe way of passing extra data from css
node to the native view counterpart.
TODO(7247021): Replace updateExtraData with generic update props mechanism after D2086999updateExtraData in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>public void updateView(ReactEditText view, CatalystStylesDiffMap props)
ViewManagerupdateView in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>protected void addEventEmitters(ThemedReactContext reactContext, ReactEditText editText)
ViewManageraddEventEmitters in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>@Nullable public java.util.Map getExportedViewConstants()
ViewManagergetExportedViewConstants in class ViewManager<ReactEditText,com.facebook.react.views.textinput.ReactTextInputShadowNode>