diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java index 5c2ca1b828f07a..bb809381494e5e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java @@ -11,6 +11,7 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.Dynamic; +import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.yoga.YogaConstants; @@ -92,7 +93,8 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setNativeId(view, (String) value); break; case ViewProps.ACCESSIBILITY_LABELLED_BY: - mViewManager.setAccessibilityLabelledBy(view, (Dynamic) value); + Dynamic dynamicFromObject = new DynamicFromObject(value); + mViewManager.setAccessibilityLabelledBy(view, dynamicFromObject); break; case ViewProps.OPACITY: mViewManager.setOpacity(view, value == null ? 1.0f : ((Double) value).floatValue()); diff --git a/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js b/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js index 294db3d0e28edb..271a3db44bc7af 100644 --- a/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js +++ b/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js @@ -27,6 +27,7 @@ const { StyleSheet, Slider, Platform, + Switch, } = require('react-native'); import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter'; @@ -228,6 +229,16 @@ class AccessibilityExample extends React.Component<{}> { /> + + + Enable Notifications + + + ); }