Glide: Placeholder and many other methods not available in 4.0.0 RC0

Created on 3 Jun 2017  路  5Comments  路  Source: bumptech/glide


Glide Version:4.0.0 RC0


Integration libraries:No


Issue details / Repro steps / Use case background: I have just added the glide dependency in my gradle file. When I try to use methods like placeholder(), centerCrop(), crossFade(), etc. between load() and into(), it gives me syntax error like there is no such method. Are they removed in this release or am I missing something ?


Glide load line / GlideModule (if any) / list Adapter code (if any):

Glide.with(this)
                        .load(imgUrl)
                        .placeholder(R.drawable.downloading)
                        .into(bikeImageView);

It gives error on placeholder() that the method doesn't exist.

bug documentation

Most helpful comment

Glide 4.0 will not support this method. please check new implementation for placeholder

Glide
    .with(mContext)
    .load(Uri.fromFile(loadedFile))
    .apply(new RequestOptions()
        .placeholder(R.drawable.image_placeholder)
    )
    .into(textImageTypeViewHolder.imgView)
;

All 5 comments

Yes, it's been removed, it's a major version change.
And, yes it is still available via APT, read http://bumptech.github.io/glide/doc/generatedapi.html and add

annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'

Duplicate of #1939.

Can you please provide a link to an example which implements the new version ?

Flickr, SVG, and contacturi samples all use APT. I'm working on an external example myself, I'm just trying out the APT.

Glide 4.0 will not support this method. please check new implementation for placeholder

Glide
    .with(mContext)
    .load(Uri.fromFile(loadedFile))
    .apply(new RequestOptions()
        .placeholder(R.drawable.image_placeholder)
    )
    .into(textImageTypeViewHolder.imgView)
;

@dw129 Glide 4 supports this method since the first stable release, you just need to set up the annotation processor as described here: http://bumptech.github.io/glide/doc/generatedapi.html#java and use GlideApp instead of Glide.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FooBarBacon picture FooBarBacon  路  3Comments

Morteza-Rastgoo picture Morteza-Rastgoo  路  3Comments

mttmllns picture mttmllns  路  3Comments

PatrickMA picture PatrickMA  路  3Comments

technoir42 picture technoir42  路  3Comments