public class PropertyAminActivity extends BaseActivity {
private CircleView circleView;
@Override
protected int bindLayout() {
return R.layout.activity_animn;
}
@Override
protected void initView() {
circleView = findViewById(R.id.circle);
}
@Override
protected void initData() {
circleView.getScaleX();
circleView.getTranslationX();
AnimatorSet animatorSet=new AnimatorSet();
ObjectAnimator scaleX = ObjectAnimator.ofFloat(circleView, "scaleX", 1, 3);
ObjectAnimator translationX = ObjectAnimator.ofFloat(circleView, "translationX", 0, 1000);
translationX.setDuration(3000);
translationX.setRepeatCount(-1);
//translationX.start();
animatorSet.play(translationX).with(scaleX);
animatorSet.setDuration(3000);
animatorSet.start();
}
}