Glide: Glide 4.5.0 signature not applied

Created on 25 Jan 2018  Â·  4Comments  Â·  Source: bumptech/glide


Glide Version:4.5.0


Integration libraries: implementation 'com.github.bumptech.glide:glide:4.5.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'


Device/Android Version:Redmi Note 4 /Android 7.0(Api 24)


Issue details / Repro steps / Use case background: I'm using glide to load images also from version 4 i'm happy to use circular function .apply(RequestOptions.circleCropTransform()) but also i wanted to use the signature or something related to clear the cache and load the latest image in the imageView


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

Glide.with...

        Glide.with(mContext)
                .load(urlProfile)
                .apply(RequestOptions.circleCropTransform())
                .signature(new StringSignature(String.valueOf(System.currentTimeMillis())))
                .diskCacheStrategy(DiskCacheStrategy.NONE)
                .into(imageView);

getting error with signature and diskCacheStrategy  so is there any alternate to signature and diskCacheStrategy   such that   .apply(RequestOptions.circleCropTransform()) this functionality should also keep working  


Layout XML: Did not Compile

<FrameLayout xmlns:android="...


Stack trace / LogCat:

paste stack trace and/or log here
question

Most helpful comment

.signature() and .diskCacheStrategy() are both methods on RequestOptions, see http://bumptech.github.io/glide/doc/options.html#requestoptions.

In particular you can just chain those options onto your existing circleCropTransform() call:

Glide.with(mContext)
  .load(urlProfile)
  .apply(RequestOptions.circleCropTransform()
      .signature(new StringSignature(...))
      .diskCacheStrategy(DiskCacheStrategy.NONE))
  .into(imageView);

All 4 comments

.signature() and .diskCacheStrategy() are both methods on RequestOptions, see http://bumptech.github.io/glide/doc/options.html#requestoptions.

In particular you can just chain those options onto your existing circleCropTransform() call:

Glide.with(mContext)
  .load(urlProfile)
  .apply(RequestOptions.circleCropTransform()
      .signature(new StringSignature(...))
      .diskCacheStrategy(DiskCacheStrategy.NONE))
  .into(imageView);

Thanks for the reply and I appreciate the great library you have made and
also the better you are maintaining it with care

Thanks and regards
Snehal

On 26-Jan-2018 1:19 AM, "Sam" notifications@github.com wrote:

.signature() and .diskCacheStrategy() are both methods on RequestOptions,
see http://bumptech.github.io/glide/doc/options.html#requestoptions.

In particular you can just chain those options onto your existing
circleCropTransform() call:

Glide.with(mContext)
.load(urlProfile)
.apply(RequestOptions.circleCropTransform()
.signature(new StringSignature(...))
.diskCacheStrategy(DiskCacheStrategy.NONE))
.into(imageView);

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bumptech/glide/issues/2839#issuecomment-360579555,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad6PHfJsGt9Rxu1TgE7yxXF7q8kjseYDks5tONqwgaJpZM4Rsd6M
.

Sure no problem, glad it's useful. I'll assume this is resolved for now, but feel free to add a comment or file a new issue if you have questions.

After using circleCropTransform(), my image getting cropped. How to prevent it from cropped?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r4m1n picture r4m1n  Â·  3Comments

kooeasy picture kooeasy  Â·  3Comments

technoir42 picture technoir42  Â·  3Comments

piedpiperlol picture piedpiperlol  Â·  3Comments

Morteza-Rastgoo picture Morteza-Rastgoo  Â·  3Comments