Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Android Application Development

You're reading from   Learning Android Application Development Start building for the world's most popular mobile platform

Arrow left icon
Product type Paperback
Published in Aug 2016
Publisher Packt
ISBN-13 9781785286117
Length 320 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Raimon Ràfols Montane Raimon Ràfols Montane
Author Profile Icon Raimon Ràfols Montane
Raimon Ràfols Montane
Laurence Dawson Laurence Dawson
Author Profile Icon Laurence Dawson
Laurence Dawson
Arrow right icon
View More author details
Toc

Widely used third-party libraries


We will see some of the most widely used libraries for handling images. These libraries have been developed and contributed by many developers and they will simplify our code, take care of all the underlying details, and reduce our application development time.

Glide

In order to use Glide, we have to add it to the dependencies section of our build.gradle file:

dependencies { 
  compile 'com.github.bumptech.glide:glide:3.7.0' 
  compile 'com.android.support:support-v4:23.2.1' 
} 

If our application is obfuscated, we need to add some lines to our proguard configuration, otherwise we will have some errors while the application is running:

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

We can simply use Glide to load images, either remote or local, to an ImageView.Glide will take care...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image