View 属性动画

ObjectAnimator oa=ObjectAnimator.ofFloat(iv,"translationX",0,10.0f,20.0f,30.0f);
oa.setDuration(4000);
oa.setRepeatCount(ObjectAnimator.INFINITE);
oa.setRepeatMode(ObjectAnimator.REVERSE);
oa.start();
原文地址:https://www.cnblogs.com/liuyinghai87/p/7149376.html