bumptech/glide

[Feature request] Improve ViewPropertyTransition.Animator

Open

#2,637 opened on Nov 24, 2017

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Java (6,176 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (35,023 stars)
PR merge metrics
 (Avg merge 4d 10h) (11 merged PRs in 30d)

Description

Glide Version: 4.3.1

When trying to understand some speed problems on low end devices, I found out that my custom animations where too slow sometimes and left the imageview in transient state too long. Meaning that recyclerview did not recycle the viewholder and created new viewholders everytime.

Fix is easy cancel animations on recycle :) But then trying to do that with current Glide API becomes complicated.

Workaround is to store a reference to viewproperty animator in a tag in the image then call the cancel in the adapter but this is quite ugly :)

I would suggest that ViewPropertyTransition.Animator is extended to have a cancel() or release() interface and have this interface called when clear is called on the target or view recycled

Contributor guide