diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index cebce68f6..783abedc8 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -248,7 +248,7 @@ android { sourceSets.main { jni.srcDirs = [] jniLibs.srcDir "$buildDir/react-ndk/exported" - res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell', 'src/main/res/views/modal'] + res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell', 'src/main/res/views/modal', 'src/main/res/views/uimanager'] java { srcDirs = ['src/main/java', 'src/main/libraries/soloader/java', 'src/main/jni/first-party/fb/jni/java'] exclude 'com/facebook/react/processing' diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK index bb7c09790..57276c344 100644 --- a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK @@ -21,6 +21,8 @@ android_library( react_native_dep("third-party/java/junit:junit"), react_native_dep("third-party/java/mockito:mockito"), react_native_dep("third-party/java/testing-support-lib:runner"), + react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"), + react_native_integration_tests_target("java/com/facebook/react/testing/network:network"), react_native_target("java/com/facebook/react:react"), react_native_target("java/com/facebook/react/bridge:bridge"), react_native_target("java/com/facebook/react/common:common"), @@ -32,7 +34,6 @@ android_library( react_native_target("java/com/facebook/react/modules/debug:interfaces"), react_native_target("java/com/facebook/react/shell:shell"), react_native_target("java/com/facebook/react/uimanager:uimanager"), - react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"), - react_native_integration_tests_target("java/com/facebook/react/testing/network:network"), + react_native_target("res:uimanager"), ], ) diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java index 8054dff33..6250d2414 100644 --- a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java @@ -17,6 +17,7 @@ import android.view.View; import android.view.ViewGroup; import com.facebook.react.NativeModuleRegistryBuilder; +import com.facebook.react.R; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManagerBuilder; import com.facebook.react.bridge.CatalystInstance; @@ -187,7 +188,9 @@ public class ReactTestHelper { } public static String getTestId(View view) { - return view.getTag() instanceof String ? (String) view.getTag() : null; + return view.getTag(R.id.react_test_id) instanceof String + ? (String) view.getTag(R.id.react_test_id) + : null; } private static View findChild(View root, Predicate predicate) { @@ -211,7 +214,7 @@ public class ReactTestHelper { return new Predicate() { @Override public boolean apply(View view) { - Object tag = view.getTag(); + Object tag = getTestId(view); return tag != null && tag.equals(tagValue); } }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index 954f2528f..c75b10b0d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -26,5 +26,6 @@ android_library( react_native_target("java/com/facebook/react/modules/i18nmanager:i18nmanager"), react_native_target("java/com/facebook/react/touch:touch"), react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), + react_native_target("res:uimanager"), ], ) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 24192175d..16c85690a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -5,6 +5,7 @@ package com.facebook.react.uimanager; import android.graphics.Color; import android.os.Build; import android.view.View; +import com.facebook.react.R; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.annotations.ReactProp; @@ -85,6 +86,9 @@ public abstract class BaseViewManager + + + +