Home Tutorials Training Consulting Products Books Company Donate Contact us

Online Training

Quick links


(c) 2009, 2017 vogella GmbH Version 0.3, 25.10.2017

This tutorial describes how to download efficiently images using Google Glide.

1. Google Glide for image processing

Every application needs to download and manage images.

Google Glide makes this easy.

To use Glide add the following dependency to your app/build.gradle file.

dependencies {
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.android.support:support-v4:25.3.1'
    // more stuff

The usage is simple.

// simple usage

// with placeholder

2. Exercise - Using Glide to download images into your RecyclerView

Use Glide to download images into your RecyclerView adapter. As a first step add the Glide dependencies to your Gradle build file.

dependencies {
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.android.support:support-v4:25.3.1'
    // more stuff

The Internet provides free example picture services for testing, for example:

Adjust your adapter implementation in your Recyclerview.

    public void onBindViewHolder(final ViewHolder holder, final int position) {
        final RssItem rssItem = rssItems.get(position);
        holder.mainLayout.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
        // to download some random data
        Random r = new Random();
        int i = r.nextInt(10);
Glide output result in RecyclerView

3. About this website

4.2. vogella GmbH training and consulting support


The vogella company provides comprehensive training and education services from experts in the areas of Eclipse RCP, Android, Git, Java, Gradle and Spring. We offer both public and inhouse training. Whichever course you decide to take, you are guaranteed to experience what many before you refer to as “The best IT class I have ever attended”.

The vogella company offers expert consulting services, development support and coaching. Our customers range from Fortune 100 corporations to individual developers.

Copyright © 2012-2018 vogella GmbH. Free use of the software examples is granted under the terms of the Eclipse Public License 2.0. This tutorial is published under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany license.

See Licence.