mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Make edittext padding fix to nodes as well
Reviewed By: ahmedre Differential Revision: D4397500 fbshipit-source-id: abf116847cbf98cccba07f1e08d8aab47a35123b
This commit is contained in:
parent
669c84f11e
commit
1d9ba508c4
@ -73,6 +73,7 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, YogaMea
|
||||
setDefaultPadding(Spacing.TOP, mEditText.getPaddingTop());
|
||||
setDefaultPadding(Spacing.END, mEditText.getPaddingEnd());
|
||||
setDefaultPadding(Spacing.BOTTOM, mEditText.getPaddingBottom());
|
||||
mEditText.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -90,11 +91,6 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, YogaMea
|
||||
TypedValue.COMPLEX_UNIT_PX,
|
||||
fontSize == UNSET ?
|
||||
(int) Math.ceil(PixelUtil.toPixelFromSP(ViewDefaults.FONT_SIZE_SP)) : fontSize);
|
||||
editText.setPadding(
|
||||
(int) Math.ceil(getPadding(Spacing.START)),
|
||||
(int) Math.ceil(getPadding(Spacing.TOP)),
|
||||
(int) Math.ceil(getPadding(Spacing.END)),
|
||||
(int) Math.ceil(getPadding(Spacing.BOTTOM)));
|
||||
|
||||
if (mNumberOfLines != UNSET) {
|
||||
editText.setLines(mNumberOfLines);
|
||||
|
Loading…
x
Reference in New Issue
Block a user