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
This commit is contained in:
Mengjue Wang
2016-07-26 12:09:29 -07:00
committed by Ahmed El-Helw
parent b8313b282b
commit ba56043715

View File

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