public class UIManagerHelper
extends java.lang.Object
UIManager
.Constructor and Description |
---|
UIManagerHelper() |
Modifier and Type | Method and Description |
---|---|
static EventDispatcher |
getEventDispatcher(ReactContext context,
int uiManagerType) |
static EventDispatcher |
getEventDispatcherForReactTag(ReactContext context,
int reactTag) |
static ReactContext |
getReactContext(android.view.View view) |
static UIManager |
getUIManager(ReactContext context,
int uiManagerType) |
static UIManager |
getUIManagerForReactTag(ReactContext context,
int reactTag) |
public static UIManager getUIManagerForReactTag(ReactContext context, int reactTag)
UIManager
that can handle the react tag received by parameter.public static UIManager getUIManager(ReactContext context, int uiManagerType)
UIManager
that can handle the react tag received by parameter.public static EventDispatcher getEventDispatcherForReactTag(ReactContext context, int reactTag)
EventDispatcher
that handles events for the reactTag received as a
parameter.public static EventDispatcher getEventDispatcher(ReactContext context, int uiManagerType)
EventDispatcher
that handles events for the UIManagerType
received
as a parameter.public static ReactContext getReactContext(android.view.View view)
ReactContext
associated to the View
received as a parameter.
We can't rely that the method View.getContext() will return the same context that was passed as a parameter during the construction of the View.
For example the AppCompatEditText class wraps the context received as a parameter in the constructor of the View into a TintContextWrapper object. See: https://android.googlesource.com/platform/frameworks/support/+/dd55716/v7/appcompat/src/android/support/v7/widget/AppCompatEditText.java#55