mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-11 11:29:03 +08:00
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:
committed by
Facebook Github Bot
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));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user