All about the “Glide”

dependencies {
    compile 'com.github.bumptech.glide:glide:3.7.0'
}

And …

Glide
.with(context)
.load( url)
.placeholder(R.mipmap.ic_launcher)  // Default image load to ImageView
.error(R.mipmap.future_studio_launcher)  // If error, ImageView will show this
.fallback( R.drawable.floorplan )  /* If url == null, ImageView will show this (To distinguish with case error by server or internet)  */
.crossFade()  // Fade Animation
.into(imageView);
  • crossFace() >< dontAnimate()

Còn nữa … (Glide có nhiều cái rất thú vị)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s