CPV stops when View is reused
OFmarting opened this issue · 1 comments
OFmarting commented
Commit 8ea4a9d resolves the memory leak but introduces a minor issue. When using the CPV in a ListView or RecyclerView where Views are recycled/reused the CPV hangs when it gets visible the second time. The solution is to override onAttachedToWindow()
and call startAnimation()
there.
I think you could even move the block
if(autostartAnimation)
startAnimation();
from init(AttributeSet attrs, int defStyle)
to onAttachedToWindow()
.
rahatarmanahmed commented
Just released v2.3.2
with the fix, should be available in a few hours.