if (startValues == null || endValues == null) {
return null;
}
final float startScale = (Float) startValues.values.get(PROPNAME_SCALE);
final float endScale = (Float) endValues.values.get(PROPNAME_SCALE);
final View view = startValues.view;
view.setScaleX(startScale);
view.setScaleY(startScale);
ValueAnimator animator = ValueAnimator.ofFloat(startScale, endScale);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
final float scale = (Float) animation.getAnimatedValue();
view.setScaleX(scale);
view.setScaleY(scale);
}
});
return animator;