Skip to content

Commit 5b4fb89

Browse files
MengjueWFacebook Github Bot 0
authored andcommitted
Fix UNSET problem for text alignment change
Summary: Use UNSET(-1) as default will lead wrong calculation for text alignment. Change it to Gravity.NO_GRAVITY to fix this problem. Reviewed By: fkgozali Differential Revision: D3624417 fbshipit-source-id: c116560e64600be60b2fe719f575701b00f20a97
1 parent ffb690f commit 5b4fb89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private static int parseNumericFontWeight(String fontWeightString) {
310310

311311
protected int mNumberOfLines = UNSET;
312312
protected int mFontSize = UNSET;
313-
protected int mTextAlign = UNSET;
313+
protected int mTextAlign = Gravity.NO_GRAVITY;
314314

315315
private float mTextShadowOffsetDx = 0;
316316
private float mTextShadowOffsetDy = 0;

0 commit comments

Comments
 (0)