If you use Glide package dependences compile 'com.github.bumptech.glide:glide:3.7.0'
than use below code
Glide
.with(your_context)
.load(image_url)
.centerCrop()
.placeholder(R.drawable.image_loading)
.error(R.drawable.image_error)
.into(imageView);
Note: As in doc
Round Pictures: CircleImageView/CircularImageView/RoundedImageView are
known to have issues with TransitionDrawable (.crossFade() with
.thumbnail() or .placeholder()) and animated GIFs, use a
BitmapTransformation (.circleCrop() will be available in v4) or
.dontAnimate() to fix the issue.
Latest update version compile 'com.github.bumptech.glide:glide:4.1.1'
or above than use below code
Glide.with(your_context)
.load(url)
.apply(new RequestOptions()
.placeholder(R.mipmap.ic_loading_image)
.centerCrop()
.dontAnimate()
.dontTransform())
.into(imageView);
If you want to load GIF File
in to Glide
with using compile 'com.github.bumptech.glide:glide:3.7.0'
than use .asGif()
method after .load()
Glide
.with(your_context)
.load(image_url)
.asGif()
.into(imageView);
If you use compile 'com.github.bumptech.glide:glide:4.1.1'
or higher(latest) dependences than,
Glide
.with(your_context)
.asGif()
.load(image_url)
.into(imageView);
Note: If you are useing glide:glide:4.1.1
or higher version than not necessary to use .asGif() method to load GIF
file it will
load GIF File
automatically
See Latest version of glide, Bug fixes, Features