Permalink
Browse files

Transfer TextUpdate padding info onto text input view

Reviewed By: achen1

Differential Revision: D4397498

fbshipit-source-id: df53d64d9992609a1dfb1ba606ac7f820794161a
  • Loading branch information...
emilsjolander authored and facebook-github-bot committed Jan 11, 2017
1 parent b50f550 commit 669c84f11e046500677dcda31b68c92b6597224a
@@ -160,16 +160,15 @@ public void receiveCommand(
@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);

0 comments on commit 669c84f

Please sign in to comment.