diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java index 55ae158bf..50828a80b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java @@ -9,6 +9,8 @@ package com.facebook.react.views.text; +import javax.annotation.Nullable; + import android.content.Context; import android.graphics.Color; import android.graphics.drawable.Drawable; @@ -24,8 +26,6 @@ import com.facebook.react.uimanager.ReactCompoundView; import com.facebook.react.uimanager.ViewDefaults; import com.facebook.react.views.view.ReactViewBackgroundDrawable; -import javax.annotation.Nullable; - public class ReactTextView extends TextView implements ReactCompoundView { private static final ViewGroup.LayoutParams EMPTY_LAYOUT_PARAMS = @@ -59,10 +59,10 @@ public class ReactTextView extends TextView implements ReactCompoundView { } setText(update.getText()); setPadding( - (int) Math.ceil(update.getPaddingLeft()), - (int) Math.ceil(update.getPaddingTop()), - (int) Math.ceil(update.getPaddingRight()), - (int) Math.ceil(update.getPaddingBottom())); + (int) Math.floor(update.getPaddingLeft()), + (int) Math.floor(update.getPaddingTop()), + (int) Math.floor(update.getPaddingRight()), + (int) Math.floor(update.getPaddingBottom())); int nextTextAlign = update.getTextAlign(); if (mTextAlign != nextTextAlign) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java index cac809562..60c62c450 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java @@ -82,10 +82,10 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements (int) Math.ceil(PixelUtil.toPixelFromSP(ViewDefaults.FONT_SIZE_SP)) : mFontSize); mComputedPadding = spacingToFloatArray(getPadding()); editText.setPadding( - (int) Math.ceil(getPadding().get(Spacing.START)), - (int) Math.ceil(getPadding().get(Spacing.TOP)), - (int) Math.ceil(getPadding().get(Spacing.END)), - (int) Math.ceil(getPadding().get(Spacing.BOTTOM))); + (int) Math.floor(getPadding().get(Spacing.START)), + (int) Math.floor(getPadding().get(Spacing.TOP)), + (int) Math.floor(getPadding().get(Spacing.END)), + (int) Math.floor(getPadding().get(Spacing.BOTTOM))); if (mNumberOfLines != UNSET) { editText.setLines(mNumberOfLines);