Pass drawable width and height in pixels for inline image

Reviewed By: achen1

Differential Revision: D7655775

fbshipit-source-id: 32887eb5a686ccc45f50fb334248aad6889f704a
This commit is contained in:
Himabindu Gadupudi 2018-04-17 13:27:46 -07:00 committed by Facebook Github Bot
parent 7c5d581d78
commit 4469952c9a
1 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ package com.facebook.react.views.text.frescosupport;
import android.graphics.Color;
import android.graphics.PorterDuff;
import com.facebook.react.uimanager.PixelUtil;
import javax.annotation.Nullable;
import android.content.res.Resources;
@ -70,12 +71,12 @@ public class FrescoBasedReactTextInlineImageSpan extends TextInlineImageSpan {
);
mDraweeControllerBuilder = draweeControllerBuilder;
mCallerContext = callerContext;
mHeight = height;
mTintColor = tintColor;
mWidth = width;
mUri = (uri != null) ? uri : Uri.EMPTY;
mHeaders = headers;
mWidth = (int)(PixelUtil.toPixelFromDIP(width));
mHeight = (int)(PixelUtil.toPixelFromDIP(height));
}
/**