diff --git a/Libraries/ART/ReactNativeART.js b/Libraries/ART/ReactNativeART.js index 760b5ff80..cf56028b1 100644 --- a/Libraries/ART/ReactNativeART.js +++ b/Libraries/ART/ReactNativeART.js @@ -11,6 +11,7 @@ const Color = require('art/core/color'); const Path = require('ARTSerializablePath'); +const Platform = require('Platform'); const Transform = require('art/core/transform'); const React = require('React'); @@ -150,11 +151,14 @@ class Surface extends React.Component { } render() { - const props = this.props; - const w = extractNumber(props.width, 0); - const h = extractNumber(props.height, 0); + const height = extractNumber(this.props.height, 0); + const width = extractNumber(this.props.width, 0); + + // WORKAROUND: Android bug in which canvas does not reflect size changes. + const key = Platform.OS === 'android' ? height + ',' + width : null; + return ( - + {this.props.children} ); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index f3942754e..e8afaa935 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -51,9 +51,8 @@ public class ReactViewGroup extends ViewGroup implements /** * Kill switch to make overflow hidden by default. This flag will eventually be removed. - * TODO (T31096050): Sets this back to `false` until ReactNativeARTSurface issue is resolved. */ - public static boolean sDefaultOverflowHidden = true; + public static boolean sDefaultOverflowHidden; private static final int ARRAY_CAPACITY_INCREMENT = 12; private static final int DEFAULT_BACKGROUND_COLOR = Color.TRANSPARENT;