Using android glide image library

Using android glide image library

How to integrate the globe image library to improve scrolling performance for the android recyclerview image gallery

In part 7 of the android performance optimisations for recyclerview image galleries we will be using android glide image library to compare image gallery scrolling performance against the other solutions in this tutorial series.

ADD GRADLE DEPENDENCY FOR GLIDE

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:recyclerview-v7:22.0.+'
    compile 'com.github.bumptech.glide:glide:3.6.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
}

CALL GLIDE API

@Override
   public void onBindViewHolder(ViewHolder holder, int position) {
       File imageFile = imagesFile.listFiles()[position];
      
       Glide.with(holder.getImageView().getContext())
               .load(imageFile)
               .into(holder.getImageView());
   }

SYNC PROJECT WITH GRADLE FILES

RUN THE CODE & COMPARE SCROLLING PERFORMANCE

About The Author
-

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>