Java Code Examples for com.nineoldandroids.animation.Animator#start()

The following examples show how to use com.nineoldandroids.animation.Animator#start() . 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: TransferControlView.java    From Silence with GNU General Public License v3.0 6 votes vote down vote up
private void display(@Nullable final View view) {
  final int sourceWidth = current == downloadDetails ? expandedWidth : contractedWidth;
  final int targetWidth = view    == downloadDetails ? expandedWidth : contractedWidth;

  if (current == view || current == null) {
    ViewGroup.LayoutParams layoutParams = getLayoutParams();
    layoutParams.width = targetWidth;
    setLayoutParams(layoutParams);
  } else {
    ViewUtil.fadeOut(current, TRANSITION_MS);
    Animator anim = getWidthAnimator(sourceWidth, targetWidth);
    anim.start();
  }

  if (view == null) {
    ViewUtil.fadeOut(this, TRANSITION_MS);
  } else {
    ViewUtil.fadeIn(this, TRANSITION_MS);
    ViewUtil.fadeIn(view, TRANSITION_MS);
  }

  current = view;
}
 
Example 2
Source File: SupportAnimatorPreL.java    From fab-toolbar with MIT License 5 votes vote down vote up
@Override
public void start() {
    Animator a = mAnimator.get();
    if(a != null) {
        a.start();
    }
}
 
Example 3
Source File: BaseIndicatorController.java    From AndroidPlayground with MIT License 5 votes vote down vote up
/**
 * make animation to start or end when target
 * view was be Visible or Gone or Invisible.
 * make animation to cancel when target view
 * be onDetachedFromWindow.
 * @param animStatus
 */
public void setAnimationStatus(AnimStatus animStatus){
    if (mAnimators==null){
        return;
    }
    int count=mAnimators.size();
    for (int i = 0; i < count; i++) {
        Animator animator=mAnimators.get(i);
        boolean isRunning=animator.isRunning();
        switch (animStatus){
            case START:
                if (!isRunning){
                    animator.start();
                }
                break;
            case END:
                if (isRunning){
                    animator.end();
                }
                break;
            case CANCEL:
                if (isRunning){
                    animator.cancel();
                }
                break;
        }
    }
}
 
Example 4
Source File: SupportAnimatorPreL.java    From fab-transformation with MIT License 5 votes vote down vote up
@Override
public void start() {
    Animator a = mAnimator.get();
    if (a != null) {
        a.start();
    }
}
 
Example 5
Source File: SupportAnimatorPreL.java    From RecyclerView-Animation-Demo with Apache License 2.0 5 votes vote down vote up
@Override
public void start() {
    Animator a = mAnimator.get();
    if(a != null) {
        a.start();
    }
}
 
Example 6
Source File: SupportAnimatorPreL.java    From material-sheet-fab with MIT License 5 votes vote down vote up
@Override
public void start() {
    Animator a = mAnimator.get();
    if(a != null) {
        a.start();
    }
}
 
Example 7
Source File: SupportAnimatorPreL.java    From ExpressHelper with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void start() {
    Animator a = mSupportFramework.get();
    if(a != null) {
        a.start();
    }
}
 
Example 8
Source File: SupportAnimatorPreL.java    From NHentai-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void start() {
    Animator a = mSupportFramework.get();
    if(a != null) {
        a.start();
    }
}
 
Example 9
Source File: SupportAnimatorPreL.java    From WeGit with Apache License 2.0 5 votes vote down vote up
@Override
public void start() {
    Animator a = mSupportFramework.get();
    if(a != null) {
        a.start();
    }
}
 
Example 10
Source File: AnimUtil.java    From PullRefreshView with Apache License 2.0 5 votes vote down vote up
public static Animator startShow(View view, float fromAlpha) {
    ViewHelper.setAlpha(view, fromAlpha);
    view.setVisibility(View.VISIBLE);
    Animator animator = ObjectAnimator.ofFloat(view, "alpha", fromAlpha, 1f);
    animator.start();
    return animator;
}
 
Example 11
Source File: SupportAnimatorPreL.java    From Jide-Note with MIT License 5 votes vote down vote up
@Override
public void start() {
    Animator a = mSupportFramework.get();
    if(a != null) {
        a.start();
    }
}
 
Example 12
Source File: AnimatedVectorDrawable.java    From CanDialog with Apache License 2.0 5 votes vote down vote up
@Override
public void start() {
    final ArrayList<Animator> animators = mAnimatedVectorState.mAnimators;
    final int size = animators.size();
    for (int i = 0; i < size; i++) {
        final Animator animator = animators.get(i);
        if (!animator.isStarted()) {
            animator.start();
        }
    }
    invalidateSelf();
}
 
Example 13
Source File: AnimUtil.java    From PullRefreshView with Apache License 2.0 4 votes vote down vote up
public static Animator startToY(final View view, float toY) {
    Animator animator = ObjectAnimator.ofFloat(view, "translationY", 0, toY);
    animator.start();
    return animator;
}
 
Example 14
Source File: AnimUtil.java    From PullRefreshView with Apache License 2.0 4 votes vote down vote up
public static Animator startFromY(final View view, float fromY) {
    Animator animator = ObjectAnimator.ofFloat(view, "translationY", fromY, 0);
    animator.start();
    return animator;
}
 
Example 15
Source File: AnimUtil.java    From PullRefreshView with Apache License 2.0 4 votes vote down vote up
public static Animator startHide(final View view) {
    view.setVisibility(View.VISIBLE);
    Animator animator = ObjectAnimator.ofFloat(view, "alpha", ViewHelper.getAlpha(view), 0f);
    animator.start();
    return animator;
}
 
Example 16
Source File: AnimUtil.java    From PullRefreshView with Apache License 2.0 4 votes vote down vote up
public static Animator startRotation(View view, float toRotation) {
    Animator animator = ObjectAnimator.ofFloat(view, "rotation", ViewHelper.getRotation(view), toRotation);
    animator.start();
    return animator;
}
 
Example 17
Source File: ArcAnimator.java    From MousePaint with MIT License 4 votes vote down vote up
@Override
public void start() {
    super.start();
    Animator a = mAnimator.get();
    if(a != null) a.start();
}