From ba56043715f346eafa41e754af471eb385d4bd01 Mon Sep 17 00:00:00 2001 From: Mengjue Wang Date: Tue, 26 Jul 2016 12:09:29 -0700 Subject: [PATCH] Change the textalign setter to support RTL Summary: @public Change the textalign setter to support RTL. In order to support text alignment according to layout style, move the textalign setter bridge function from ReactTextViewManager.java to ReactTextShadowNode.java and calculate it correctly on RCTTextUpdate. Reviewed By: dmmiller Differential Revision: D3597494 --- .../src/main/java/com/facebook/react/flat/RCTTextInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java b/ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java index c76886bf8..1f56312bc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java +++ b/ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java @@ -125,7 +125,7 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, CSSNode super.onCollectExtraUpdates(uiViewOperationQueue); if (mJsEventCount != UNSET) { ReactTextUpdate reactTextUpdate = - new ReactTextUpdate(getText(), mJsEventCount, false, getPadding(), Float.NaN); + new ReactTextUpdate(getText(), mJsEventCount, false, getPadding(), Float.NaN, UNSET); // TODO: the Float.NaN should be replaced with the real line height see D3592781 uiViewOperationQueue.enqueueUpdateExtraData(getReactTag(), reactTextUpdate); }