From 2a02621e744d91f3af5416e667512e7548558746 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Fri, 15 Jan 2016 08:33:15 -0800 Subject: [PATCH] Fix incorrect size issue with inline image text Reviewed By: andreicoman11 Differential Revision: D2834175 fb-gh-sync-id: 827d37e0128eb07f2e009479269b63c3a3549315 --- .../com/facebook/react/views/text/ReactTextShadowNode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java index 693e52b4d..314df23ef 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java @@ -161,8 +161,8 @@ public class ReactTextShadowNode extends LayoutShadowNode { int start = sb.length(); // Create our own internal ImageSpan which will allow us to correctly layout the Image Resources resources = node.getThemedContext().getResources(); - int height = (int) PixelUtil.toDIPFromPixel(node.getStyleHeight()); - int width = (int) PixelUtil.toDIPFromPixel(node.getStyleWidth()); + int height = (int) Math.ceil(node.getStyleHeight()); + int width = (int) Math.ceil(node.getStyleWidth()); TextInlineImageSpan imageSpan = new TextInlineImageSpan( resources, height,