Glide: Animated Gif Pause/Resume

Created on 4 Nov 2016  路  6Comments  路  Source: bumptech/glide

Just wanted to be sure, is this function not supported or I overlooked it?

Thank you.

question

Most helpful comment

GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(imageView, 1);
//after image view , u can set loop count via constructor
Glide.with(this).load(sss_gif).into(imageViewTarget);

All 6 comments

See #908, I'm not exactly sure if it's pause/resume or stop/restart operation though, but that's the only API currently.

My mistake on the title. It's supposed to be "pause/resume". So it only supports stop/restart through the Animatable class right?

Thank you.

To be correct, it looks like it's pause/restart, because GifDrawable.start has a resetLoopCount() call.

Oh, wait, loop count is not the same as current frame :) So it looks more like pause/resume from code. If that's true, that's what you need, and additionally you can emulate restart by loading the same resource again into the same view.

Give it a try, that's the best course of action here.

GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(imageView, 1);
//after image view , u can set loop count via constructor
Glide.with(this).load(sss_gif).into(imageViewTarget);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ncit picture Ncit  路  3Comments

sergeyfitis picture sergeyfitis  路  3Comments

PatrickMA picture PatrickMA  路  3Comments

ghost picture ghost  路  3Comments

mttmllns picture mttmllns  路  3Comments