tigerjj / FasterAnimationsContainer

Frame Animation with Drawable without OutOfMemory
84 stars 32 forks source link

reenter activity, the animation will not show #9

Open ddxxll2008 opened 7 years ago

ddxxll2008 commented 7 years ago

this animation is great, but when i exit an activity and enter it again, the animation will not show. so I add an destroy method to set instance = null when exiting, then the problem solved.

MehulKK commented 7 years ago

@ddxxll2008: you are right awesome animation but I face the same issue which you mentation as animation not showing after restart Activity. I already apply the same solution which you given but still I not solve it. can you please help me for this.

ddxxll2008 commented 7 years ago

@MehulKK you can add this method public void destroy() { mHandler.removeCallbacksAndMessages(null); sInstance = null; }

but there is another problem, the AsyncTask will not end when you destory fasteranimationcontainer. so sometimes there is a delay to show the animation. if you want the animation show immediately, you will stop use the asynctask.

you can see https://github.com/tigerjj/FasterAnimationsContainer/issues/10.

MehulKK commented 7 years ago

@ddxxll2008 👍 : thank you for your quick suggestion and its work for me.