Using android glide image library
August 17, 2015 4:50 am

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
Category: Performance, tutorials