Display byte[] to ImageView in Android

Viewed 33823

Is it possible to do this? I'm reading an XML file that has the Base64 string of an image. I'm planning to use Base64.decode to have the byte array of the image string. I'm stuck though on how to use it in an ImageView. Do i have to create a 'drawable' class first then set it to ImageView's src property?

Thanks!

5 Answers

Late for this solution however i had this i had to share:

 Glide.with(context)
.load(Base64.decode(base_64_string,0))
//.load(Uri.parse(file_uri_string)//load from file path
.diskCacheStrategy(DiskCacheStrategy.NONE)//to prevent caching
.skipMemoryCache(true)//to prevent caching
.into(view);
Related