Migrate text layout code to use TextDirectionHeuristicCompat instead of forceLTR flag

Summary: This allows users of the API to have greater control over handling RTL. One example is Components which needs this greater control to correctly handle RTL.

Differential Revision: D3120721
This commit is contained in:
Emil Sjolander
2016-04-05 05:01:09 -07:00
committed by Ahmed El-Helw
parent f4690ef8de
commit 7a31ca29a4

View File

@@ -11,6 +11,7 @@ package com.facebook.react.flat;
import javax.annotation.Nullable;
import android.support.v4.text.TextDirectionHeuristicsCompat;
import android.text.BoringLayout;
import android.text.Layout;
import android.text.StaticLayout;
@@ -132,7 +133,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
TextUtils.TruncateAt.END,
maximumWidth,
mNumberOfLines,
false);
TextDirectionHeuristicsCompat.FIRSTSTRONG_LTR);
if (mDrawCommand != null && !mDrawCommand.isFrozen()) {
mDrawCommand.setLayout(layout);