public class ReactProgressBarViewManager extends BaseViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode> implements AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>
NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REACT_CLASS |
sStateDescriptionMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactProgressBarViewManager() |
| Modifier and Type | Method and Description |
|---|---|
static android.widget.ProgressBar |
createProgressBar(android.content.Context context,
int style)
We create ProgressBars on both the UI and shadow threads.
|
ProgressBarShadowNode |
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.progressbar.ProgressBarContainerView |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
protected ViewManagerDelegate<com.facebook.react.views.progressbar.ProgressBarContainerView> |
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.lang.String |
getName() |
java.lang.Class<ProgressBarShadowNode> |
getShadowNodeClass()
This method should return
Class instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance(). |
long |
measure(android.content.Context context,
ReadableMap localData,
ReadableMap props,
ReadableMap state,
float width,
YogaMeasureMode widthMode,
float height,
YogaMeasureMode heightMode,
float[] attachmentsPositions)
Subclasses can override this method to implement custom measure functions for the ViewManager
|
protected void |
onAfterUpdateTransaction(com.facebook.react.views.progressbar.ProgressBarContainerView view)
Callback that will be triggered after all properties are updated in current update transaction
(all @ReactProp handlers for properties updated in current transaction have been called).
|
void |
setAnimating(com.facebook.react.views.progressbar.ProgressBarContainerView view,
boolean animating) |
void |
setColor(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.Integer color) |
void |
setIndeterminate(com.facebook.react.views.progressbar.ProgressBarContainerView view,
boolean indeterminate) |
void |
setProgress(com.facebook.react.views.progressbar.ProgressBarContainerView view,
double progress) |
void |
setStyleAttr(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String styleName) |
void |
setTestID(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String value) |
void |
setTypeAttr(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String value) |
void |
updateExtraData(com.facebook.react.views.progressbar.ProgressBarContainerView root,
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). |
getExportedCustomDirectEventTypeConstants, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setShadowColor, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndexaddEventEmitters, createShadowNodeInstance, createView, createViewInstance, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, onDropViewInstance, receiveCommand, receiveCommand, setPadding, updateProperties, updateStatecanOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroypublic static final java.lang.String REACT_CLASS
public static android.widget.ProgressBar createProgressBar(android.content.Context context,
int style)
public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>protected com.facebook.react.views.progressbar.ProgressBarContainerView createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>public void setStyleAttr(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String styleName)
setStyleAttr in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setColor(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.Integer color)
setColor in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setIndeterminate(com.facebook.react.views.progressbar.ProgressBarContainerView view,
boolean indeterminate)
setIndeterminate in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setProgress(com.facebook.react.views.progressbar.ProgressBarContainerView view,
double progress)
setProgress in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setAnimating(com.facebook.react.views.progressbar.ProgressBarContainerView view,
boolean animating)
setAnimating in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setTestID(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String value)
setTestID in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public void setTypeAttr(com.facebook.react.views.progressbar.ProgressBarContainerView view,
java.lang.String value)
setTypeAttr in interface AndroidProgressBarManagerInterface<com.facebook.react.views.progressbar.ProgressBarContainerView>public ProgressBarShadowNode createShadowNodeInstance()
ViewManagerReactShadowNode 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 ReactShadowNodecreateShadowNodeInstance in class ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>public java.lang.Class<ProgressBarShadowNode> getShadowNodeClass()
ViewManagerClass 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 ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>Class object that represents type of shadow node used by this view manager.public void updateExtraData(com.facebook.react.views.progressbar.ProgressBarContainerView root,
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 T7247021: Replace updateExtraData with generic update props mechanism after D2086999
updateExtraData in class ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>protected void onAfterUpdateTransaction(com.facebook.react.views.progressbar.ProgressBarContainerView view)
ViewManageronAfterUpdateTransaction in class BaseViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>protected ViewManagerDelegate<com.facebook.react.views.progressbar.ProgressBarContainerView> 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<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>ViewManagerDelegate if the props of the view managed by this
view manager should be set via this delegatepublic long measure(android.content.Context context,
ReadableMap localData,
ReadableMap props,
ReadableMap state,
float width,
YogaMeasureMode widthMode,
float height,
YogaMeasureMode heightMode,
float[] attachmentsPositions)
ViewManagermeasure in class ViewManager<com.facebook.react.views.progressbar.ProgressBarContainerView,ProgressBarShadowNode>context - ReactContext used for the view.localData - ReadableMap containing "local data" defined in C++props - ReadableMap containing JS propsstate - ReadableMap containing state defined in C++width - width of the view (usually zero)widthMode - widthMode used during calculation of layoutheight - height of the view (usually zero)heightMode - widthMode used during calculation of layoutattachmentsPositions - int[] array containing 2x times the amount of attachments
of the view. An attachment represents the position of an inline view that needs to be
rendered inside a component and it requires the content of the parent view in order to be
positioned. This array is meant to be used by the platform to RETURN the position of each
attachment, as a result of the calculation of layout. (e.g. this array is used to measure
inlineViews that are rendered inside Text components). On most of the components this array
will be contain a null value.
Even values will represent the TOP of each attachment, Odd values represent the LEFT of each attachment.