diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index c471cac29d6b73..095d8908e01855 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -3940,6 +3940,7 @@ public abstract interface class com/facebook/react/turbomodule/core/interfaces/T public abstract class com/facebook/react/uimanager/BaseViewManager : com/facebook/react/uimanager/ViewManager, android/view/View$OnLayoutChangeListener, com/facebook/react/uimanager/BaseViewManagerInterface { public fun ()V + public fun (Lcom/facebook/react/bridge/ReactApplicationContext;)V public fun getExportedCustomBubblingEventTypeConstants ()Ljava/util/Map; public fun getExportedCustomDirectEventTypeConstants ()Ljava/util/Map; protected fun onAfterUpdateTransaction (Landroid/view/View;)V @@ -5160,6 +5161,7 @@ public class com/facebook/react/uimanager/ViewGroupDrawingOrderHelper { public abstract class com/facebook/react/uimanager/ViewGroupManager : com/facebook/react/uimanager/BaseViewManager, com/facebook/react/uimanager/IViewGroupManager { public fun ()V + public fun (Lcom/facebook/react/bridge/ReactApplicationContext;)V public synthetic fun addView (Landroid/view/View;Landroid/view/View;I)V public fun addView (Landroid/view/ViewGroup;Landroid/view/View;I)V public fun addViews (Landroid/view/ViewGroup;Ljava/util/List;)V @@ -5182,6 +5184,7 @@ public abstract class com/facebook/react/uimanager/ViewGroupManager : com/facebo public abstract class com/facebook/react/uimanager/ViewManager : com/facebook/react/bridge/BaseJavaModule { public fun ()V + public fun (Lcom/facebook/react/bridge/ReactApplicationContext;)V protected fun addEventEmitters (Lcom/facebook/react/uimanager/ThemedReactContext;Landroid/view/View;)V public fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode; public fun createShadowNodeInstance (Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/uimanager/ReactShadowNode; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 3e3d86e87dcf0c..8b8322e503239b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -19,6 +19,7 @@ import com.facebook.common.logging.FLog; import com.facebook.react.R; import com.facebook.react.bridge.Dynamic; +import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; @@ -54,6 +55,14 @@ public abstract class BaseViewManager private static WeakHashMap mZIndexHash = new WeakHashMap<>(); + public ViewGroupManager() { + super(null); + } + + public ViewGroupManager(@Nullable ReactApplicationContext reactContext) { + super(reactContext); + } + @Override public LayoutShadowNode createShadowNodeInstance() { return new LayoutShadowNode(); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java index 3c1e668cef72e7..aedc311fa381d5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java @@ -46,6 +46,14 @@ public abstract class ViewManager */ @Nullable private HashMap> mRecyclableViews = null; + public ViewManager() { + super(null); + } + + public ViewManager(@Nullable ReactApplicationContext reactContext) { + super(reactContext); + } + /** Call in constructor of concrete ViewManager class to enable. */ protected void setupViewRecycling() { if (ReactFeatureFlags.enableViewRecycling) {