private String[] scoreText = {" ", ". ", ". . ", ". . ."};
if (valueAnimator == null) {
valueAnimator = ValueAnimator.ofInt(0, 4).setDuration(1000);
valueAnimator.setRepeatCount(ValueAnimator.INFINITE);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int i = (int) animation.getAnimatedValue();
StrUtils.setTvStr(tvFinding, "加载中" + scoreText[i % scoreText.length]);
}
});
}
valueAnimator.start();