Java Code Examples for com.nineoldandroids.animation.Animator#getDuration()
The following examples show how to use
com.nineoldandroids.animation.Animator#getDuration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnimationProxy.java From UltimateAndroid with Apache License 2.0 | 6 votes |
private AnimationProxy(View hoverView, int childId, Animator animator){ if(animator == null) throw new IllegalArgumentException("Animator can not be null"); if(hoverView == null) throw new IllegalArgumentException("hoverView can not be null"); View child = hoverView.findViewById(childId); if(child == null) throw new IllegalArgumentException("Can not find child"); this.targetView = child; this.duration = animator.getDuration(); this.delay = animator.getStartDelay(); this.interpolator = null; this.animator = animator; }
Example 2
Source File: DefaultTransitionController.java From android-transition with Apache License 2.0 | 5 votes |
/** * @param target the View that should be transitioned * @param mAnimSet */ public DefaultTransitionController(@Nullable View target, @NonNull AnimatorSet mAnimSet) { super(target); this.mAnimSet = mAnimSet; mStartDelay = mAnimSet.getStartDelay(); ArrayList<Animator> animators = mAnimSet.getChildAnimations(); final int size = animators.size(); Animator animator; for (int i = 0; i < size; i++) { animator = animators.get(i); if (!(animator instanceof ValueAnimator)) { throw new UnsupportedOperationException("Only ValueAnimator and its subclasses are supported: " + animator); } } mDuration = mAnimSet.getDuration(); if (mAnimSet.getDuration() >= 0) { long duration = mAnimSet.getDuration(); for (int i = 0; i < size; i++) { animators.get(i).setDuration(duration); } } else { for (int i = 0; i < size; i++) { animator = animators.get(i); long endTime = animator.getStartDelay() + animator.getDuration(); if (mDuration < endTime) { mDuration = endTime; } } } mTotalDuration = mStartDelay + mDuration; updateProgressWidth(); }
Example 3
Source File: ArcAnimator.java From MousePaint with MIT License | 4 votes |
@Override public long getStartDelay() { Animator a = mAnimator.get(); return a == null ? 0 : a.getDuration(); }
Example 4
Source File: ArcAnimator.java From MousePaint with MIT License | 4 votes |
@Override public long getDuration() { Animator a = mAnimator.get(); return a == null ? 0 : a.getDuration(); }