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:
parent
7c5d581d78
commit
4469952c9a
|
@ -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));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue