bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.66k stars 6.12k forks source link

How to use Glide with animate-vector-drawable-compat as loading-progress indicator? #1261

Closed XinyueZ closed 8 years ago

XinyueZ commented 8 years ago

I wann use Glide and avoid using Progress controller to make a loading indicator. I try with animate-vector-drawable-compat and using scrCompat , start() call whatever like example codes official. But it doesn't work.

TWiStErRob commented 8 years ago

Can you please share your code and vector so I can try and build on it?

I think all you need is to get a drawable from compat and then pass it to .placeholder(). Maybe needs starting as well. If vector drawable uses level to animate then you need a progressbar, or animate the level yourself.

TWiStErRob commented 8 years ago

I just tried this and it works perfectly fine, here's a checklist:

Full working example in commit linked just above this comment: as a bonus there's crossFade and the loaded image is a GIF animation.