How can i use Glide library to load Bitmap into my ImageView? I want to create a custom image with text and load it into imageview using Glide.
This
I don't know performance, but you can try this:
First of all transform your bitmap as byte[] array:
private byte[] bitmapToByte(Bitmap bitmap){
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
byte[] byteArray = stream.toByteArray();
return byteArray;
}
Then use glide in this way:
Glide.with(holder.imagePhoto.getContext()).load(bitmapToByte(yourBitmap)).asBitmap().override(300, 300).fitCenter().into(holder.imagePhoto);
In your case:
Glide.with(holder.imagePhoto.getContext()).load(bitmapToByte(yourBitmap)).asBitmap().into(holder.imagePhoto); //>>not tested