Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Catching while showing images using ParseFile through

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 503
    Comment on it

    The problem that I encountered when showing images in ListView from is catching because we get ParseFile from cloud.


    So I first change ParseFile to byte[] and then use Glide library that allow byte[] also to load image.
    Glide's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is also effective for almost any case where you need to fetch, resize, and display a remote image.

    To implement Glide library, first of all add dependency in gradle file.

    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile ''

    For dependency on proguard config, you need to add these lines in proguard.cfg

    -keep public class * implements com.bumptech.glide.module.GlideModule
    -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
      **[] $VALUES;
      public *;


    Below is the code to load ParseFile using Glide library

     parseFile.getDataInBackground(new GetDataCallback() {
                public void done(byte[] data, ParseException e) {
                    Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
                    FlexLogger.createLog("Bitmap: " + bitmap);


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: