bumptech/glide

[Feature request] Improve ViewPropertyTransition.Animator

Open

#2.637 geöffnet am 24. Nov. 2017

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (6.176 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (35.023 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 10h) (11 gemergte PRs in 30 T)

Beschreibung

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