How to resume and pause ObjectAnimator in Android for API Levels below 19?

后端 未结 3 1792
Happy的楠姐
Happy的楠姐 2021-02-14 05:20

I am aware that API level 19 supports pause() and resume() on ObjectAnimators. But in my project at API level 14, I have an ObjectAnimator which is applied to an Image view to r

3条回答
  •  北海茫月
    2021-02-14 06:18

    Its probably too late for me to answer, i just came across this problem and i solved it using your method. i just added two things to your approach 1. In the start of animation check if the ** mCurrentPlayTime** is greater than zero.if its >0 then setCurrentPlayTime. otherwise its useless. 2. when your animation ends make it zero again.

提交回复
热议问题