From a5413846216aec2d03ca8c71a0493e1b4a06da3c Mon Sep 17 00:00:00 2001 From: Ahmed El-Helw Date: Thu, 3 Mar 2016 21:36:37 -0800 Subject: [PATCH] Simplify width calculation in RCTText Summary: getLayoutWidth is the same as right - left, and since we have right and left, we can save a method call. Reviewed By: sriramramani Differential Revision: D3010697 --- ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java b/ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java index e4f0a547f..e2b98d233 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java +++ b/ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java @@ -173,7 +173,7 @@ import com.facebook.react.uimanager.annotations.ReactProp; mDrawCommand = new DrawTextLayout(new BoringLayout( mText, PAINT, - (int) getLayoutWidth(), + (int) (right - left), mAlignment, mSpacingMult, mSpacingAdd,