
如何恢复和暂停ObjectAnimator在Android中为API水平低于19
2016-04-25 · 知道合伙人数码行家

知道合伙人数码行家
采纳数:117525
获赞数:517236
长期从事计算机组装,维护,网络组建及管理。对计算机硬件、操作系统安装、典型网络设备具有详细认知。
向TA提问 私信TA
关注

展开全部
设定动画在指定时间点的位置。这个时候应该是介于0和动画的总持续时间,包括任何重复。如果动画尚未开始,那么就不会前进向前后它被设置为这个时间;它只需设置时间这个数值,并依据该时间的任何适当的行动。如果动画已经在运行,那么setCurrentPlayTime()将当前播放时间设定为这个值,并继续从该点播放。
<一href="http://developer.android.com/reference/android/animation/ValueAnimator.html#setCurrentPlayTime(long)" rel="nofollow">http://developer.android.com/reference/android/animation/ValueAnimator.html#setCurrentPlayTime(long)
私人无效stopAnimation(){
mCurrentPlayTime = mRotateAntiClockwiseAnimator.getCurrentPlayTime();
mRotateAntiClockwiseAnimator.cancel();
}
私人无效startAnimation(){
mRotateAntiClockwiseAnimator.start();
mRotateAntiClockwiseAnimator.setCurrentPlayTime(mCurrentPlayTime);
}
<一href="http://developer.android.com/reference/android/animation/ValueAnimator.html#setCurrentPlayTime(long)" rel="nofollow">http://developer.android.com/reference/android/animation/ValueAnimator.html#setCurrentPlayTime(long)
私人无效stopAnimation(){
mCurrentPlayTime = mRotateAntiClockwiseAnimator.getCurrentPlayTime();
mRotateAntiClockwiseAnimator.cancel();
}
私人无效startAnimation(){
mRotateAntiClockwiseAnimator.start();
mRotateAntiClockwiseAnimator.setCurrentPlayTime(mCurrentPlayTime);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询