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 коммит произвёл Ahmed El-Helw
Родитель f4690ef8de
Коммит 7a31ca29a4
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);