Glide does not resolve its method

Viewed 47210

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?

7 Answers

Glide version: 4.8.0

Glide.with(this)
        .load("https://media.giphy.com/media/98uBZTzlXMhkk/giphy.gif")
        .apply(new RequestOptions()
                .placeholder(R.drawable.placeholder)
                .error(R.drawable.error)
                .centerCrop()
                .fitCenter())
        .into(imageView);
Related