Fix text in ReactTextView being vertically displayed

Summary:
## Issue:
Sometimes ReactTextView are vertically displayed as one column with bridgeless.

## Root cause:
After debugging, I found out this is caused by a workaround in 2016 to fix a crash caused by mLayout occasionally being non-null and triggers relayout during setText.

https://github.com/facebook/react-native/pull/7011

## Fix
Revert previous hack, if the crash happens again I'll try to fix it.

Changelog:
[Android][Fixed] -  Fix text in ReactTextView sometimes being vertically displayed

Reviewed By: mdvacca

Differential Revision: D26581756

fbshipit-source-id: a373d84dc1ab3d787bda7ec82f2d0865a354cf60
This commit is contained in:
Lulu Wu
2021-02-24 12:19:07 -08:00
committed by Facebook GitHub Bot
parent 013b39f32c
commit 86321a35c0
2 changed files with 11 additions and 5 deletions
@@ -59,4 +59,7 @@ public class ReactFeatureFlags {
/** Enables a more aggressive cleanup during destruction of ReactContext */
public static boolean enableReactContextCleanupFix = false;
/** Enables setting layout params to empty to fix a crash */
public static boolean enableSettingEmptyLayoutParams = false;
}