mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 09:21:44 +08:00
Transfer TextUpdate padding info onto text input view
Reviewed By: achen1 Differential Revision: D4397498 fbshipit-source-id: df53d64d9992609a1dfb1ba606ac7f820794161a
This commit is contained in:
committed by
Facebook Github Bot
parent
b50f55026a
commit
669c84f11e
@@ -160,16 +160,15 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
||||
|
||||
@Override
|
||||
public void updateExtraData(ReactEditText view, Object extraData) {
|
||||
if (extraData instanceof float[]) {
|
||||
float[] padding = (float[]) extraData;
|
||||
if (extraData instanceof ReactTextUpdate) {
|
||||
ReactTextUpdate update = (ReactTextUpdate) extraData;
|
||||
|
||||
view.setPadding(
|
||||
(int) Math.floor(padding[0]),
|
||||
(int) Math.floor(padding[1]),
|
||||
(int) Math.floor(padding[2]),
|
||||
(int) Math.floor(padding[3]));
|
||||
} else if (extraData instanceof ReactTextUpdate) {
|
||||
ReactTextUpdate update = (ReactTextUpdate) extraData;
|
||||
(int) update.getPaddingLeft(),
|
||||
(int) update.getPaddingTop(),
|
||||
(int) update.getPaddingRight(),
|
||||
(int) update.getPaddingBottom());
|
||||
|
||||
if (update.containsImages()) {
|
||||
Spannable spannable = update.getText();
|
||||
TextInlineImageSpan.possiblyUpdateInlineImageSpans(spannable, view);
|
||||
|
||||
Reference in New Issue
Block a user