Today I'm trying to use Glide
image loader in my android application while using this I had facing method not resolving problem.
Glide
.with(this)
.load(R.drawable.image_default_profile_picture)
.into(mUserImage);
This code working pretty fine. But when I'm trying this
Glide
.with(this)
.load(R.drawable.image_default_profile_picture)
.placeholder(R.mipmap.ic_launcher)
.fitCenter()
.into(mUserImage);
Then this saying cannot resolve method fitCenter()
, placeholder
.
What I am missing?
Seems like updated library has any issue. Add .apply(new RequestOptions()
to continue with latest version.
CODE
Glide
.with(this)
.load(R.drawable.image_default_profile_picture)
.apply(new RequestOptions()
.placeholder(R.mipmap.ic_launcher)
.fitCenter())
.into(mUserImage);