Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void valueAnimate(final View obj, int from, int to, Interpolator interpolator, long duration, long delay){
- ValueAnimator anim = ValueAnimator.ofInt(from, to);
- anim.setInterpolator(interpolator == null ? DEFAULT_INTERPOLATOR : interpolator);
- anim.setDuration(duration);
- anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- Integer value = (Integer) animation.getAnimatedValue();
- obj.getLayoutParams().height = value.intValue();
- obj.requestLayout();
- }
- });
- anim.setStartDelay(delay);
- anim.start();
- }
- Animator.valueAnimate(mapUtilsContainer, CURR_MAPUTILC_H, 800, OVERSHOOT, 300, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement