From f83281e2ce2aece44b1207844d8a5149d5d2e78d Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 11 Feb 2019 14:10:42 -0800 Subject: [PATCH] Disable OverlappingRendering for ReactTextView Summary: This diff disables OverlappingRendering for ReactTextView to avoid the exception: ``` java.lang.IllegalStateException: Unable to create layer for com.facebook.react.views.text.ReactTextView ``` during fade animations OverlappingRendering enables an optimization during rendering of animations per component, disabling this might affect performance of animations inside TextView. We will add a ReactFlag to experiment on how this affect other surfaces. Reviewed By: blairvanderhoof Differential Revision: D14027631 fbshipit-source-id: c1a84e7488c44582f7b7c78965aeb7bd27f82368 --- .../java/com/facebook/react/views/text/ReactTextView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java index 735904c80..731a87cac 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java @@ -211,6 +211,11 @@ public class ReactTextView extends TextView implements ReactCompoundView { } } + @Override + public boolean hasOverlappingRendering() { + return false; + } + /* package */ void setGravityHorizontal(int gravityHorizontal) { if (gravityHorizontal == 0) { gravityHorizontal = mDefaultGravityHorizontal;