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
This commit is contained in:
David Vacca 2019-02-11 14:10:42 -08:00 committed by Facebook Github Bot
parent cdd615136f
commit f83281e2ce

View File

@ -211,6 +211,11 @@ public class ReactTextView extends TextView implements ReactCompoundView {
} }
} }
@Override
public boolean hasOverlappingRendering() {
return false;
}
/* package */ void setGravityHorizontal(int gravityHorizontal) { /* package */ void setGravityHorizontal(int gravityHorizontal) {
if (gravityHorizontal == 0) { if (gravityHorizontal == 0) {
gravityHorizontal = mDefaultGravityHorizontal; gravityHorizontal = mDefaultGravityHorizontal;