android: decode base64 image synchronously
This commit is contained in:
parent
b1b100ccf4
commit
7f21d8293f
@ -456,7 +456,11 @@ public class ImageNode extends ViewNode<ImageView> {
|
|||||||
if (!TextUtils.isEmpty(imageType) && !TextUtils.isEmpty(base64)) {
|
if (!TextUtils.isEmpty(imageType) && !TextUtils.isEmpty(base64)) {
|
||||||
try {
|
try {
|
||||||
byte[] data = Base64.decode(base64, Base64.DEFAULT);
|
byte[] data = Base64.decode(base64, Base64.DEFAULT);
|
||||||
loadIntoTarget(Glide.with(getContext()).load(data));
|
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
|
||||||
|
view.setImageBitmap(bitmap);
|
||||||
|
if (!TextUtils.isEmpty(loadCallbackId)) {
|
||||||
|
callJSResponse(loadCallbackId);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user