bumptech/glide

[Feature request] Improve ViewPropertyTransition.Animator

Open

#2,637 创建于 2017年11月24日

在 GitHub 查看
 (8 评论) (0 反应) (0 负责人)Java (35,023 star) (6,176 fork)batch import
enhancementhelp wanted

描述

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

贡献者指南