We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想要兼容BASE64需要改动这两个文件,Html.class,以及AreImageGetter.class。
在AreImageGetter.class文件找到getDrawable(),加入判断: else if (source.startsWith("data:image")){ // data:image/jpg;base64 AreUrlDrawable areUrlDrawable = new AreUrlDrawable(mContext); BitmapTarget bitmapTarget = new BitmapTarget(areUrlDrawable, mTextView); try { //ImageUtil.INSTANCE.str2Bitmap(source); //此方法为转bitmap方法,source为base64字符串 Bitmap s = ImageUtil.INSTANCE.str2Bitmap(source); sGlideRequests.asBitmap().load(s).into(bitmapTarget); return areUrlDrawable; } catch (Exception ignored) { ignored.printStackTrace(); } }
在Html.class文件找到startImg(),加入判断: else if (src.startsWith("data:image")){ imageSpan = new AreImageSpan(sContext, d, src); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
想要兼容BASE64需要改动这两个文件,Html.class,以及AreImageGetter.class。
在AreImageGetter.class文件找到getDrawable(),加入判断:
else if (source.startsWith("data:image")){
// data:image/jpg;base64
AreUrlDrawable areUrlDrawable = new AreUrlDrawable(mContext);
BitmapTarget bitmapTarget = new BitmapTarget(areUrlDrawable, mTextView);
try {
//ImageUtil.INSTANCE.str2Bitmap(source);
//此方法为转bitmap方法,source为base64字符串
Bitmap s = ImageUtil.INSTANCE.str2Bitmap(source);
sGlideRequests.asBitmap().load(s).into(bitmapTarget);
return areUrlDrawable;
} catch (Exception ignored) {
ignored.printStackTrace();
}
}
在Html.class文件找到startImg(),加入判断:
else if (src.startsWith("data:image")){
imageSpan = new AreImageSpan(sContext, d, src);
}
The text was updated successfully, but these errors were encountered: