use of com.marshalchen.common.uimodule.nineoldandroids.animation.ObjectAnimator in project UltimateAndroid by cymcsg.
the class ContextualUndoAdapter method swipeView.
private void swipeView(final View view, final int dismissPosition) {
ObjectAnimator animator = ObjectAnimator.ofFloat(view, X, view.getMeasuredWidth());
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animator) {
onViewSwiped(((ContextualUndoView) view).getItemId(), dismissPosition);
}
});
animator.start();
}
use of com.marshalchen.common.uimodule.nineoldandroids.animation.ObjectAnimator in project UltimateAndroid by cymcsg.
the class FilckerAnimationListView method animateY.
protected ObjectAnimator animateY(final View view, final float oldY, final float newY, final float durationUnit) {
final int duration = getDuration(oldY, newY, durationUnit);
final ObjectAnimator anim = ObjectAnimator.ofFloat(AnimatorProxy.wrap(view), "translationY", oldY - newY, 0);
final int finalDuration = Math.min(Math.max(duration, MIN_ANIM_DURATION), MAX_ANIM_DURATION);
anim.setDuration((long) (finalDuration * animationDurationFactor));
anim.setInterpolator(translateInterpolater);
return anim;
}
Aggregations