Java Code Examples for android.animation.ValueAnimator#end()

The following examples show how to use android.animation.ValueAnimator#end() . 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: GestureLockView.java    From GestureLockView with Apache License 2.0 6 votes vote down vote up
/**
 * ACTION_UP/ACTION_CANCEL事件处理方法
 */
private void upEventDeal() {
    // 1.回调手势解锁监听器Complete方法
    if (mGestureLockListener != null) {
        mGestureLockListener.onComplete(getPassword());
    }
    // 2.清除触摸点到最后按下单元点的连线
    if (!mPressPoints.isEmpty()) {
        mEventX = mPressPoints.get(mPressPoints.size() - 1).x;
        mEventY = mPressPoints.get(mPressPoints.size() - 1).y;
    }
    // 3.提前结束未执行完的动画
    if (!mPointAnimators.isEmpty()) {
        for (ValueAnimator animator : mPointAnimators) {
            animator.end();
        }
        mPointAnimators.clear();
    }
    // 4.重绘
    postInvalidate();
}
 
Example 2
Source File: EyebrowsView.java    From Eyebrows with MIT License 5 votes vote down vote up
/**
 * stop the anim
 */
public void stop(){
    viewRefreshAnimator.setRepeatCount(0);
    viewRefreshAnimator.removeAllListeners();
    viewRefreshAnimator.removeAllUpdateListeners();
    viewRefreshAnimator.cancel();
    viewRefreshAnimator.end();
    for (ValueAnimator valueAnimator : eyebrowsAnimators) {
        valueAnimator.setRepeatCount(0);
        valueAnimator.removeAllListeners();
        valueAnimator.removeAllUpdateListeners();
        valueAnimator.cancel();
        valueAnimator.end();
    }
}
 
Example 3
Source File: MainActivity.java    From GotoSleep with GNU General Public License v3.0 5 votes vote down vote up
private void clearEgg(){
    //figure out how to do this
    boolean temp = egg;
    boolean eggCancel = !egg; //if egg is enabled, eggCancel will be false
    egg = false;
    moon.clearAnimation();
    for (ValueAnimator colorAnimation : colorAnimations) {
        colorAnimation.end();
    }
    if (eggCancel) {
        //moon.setColorFilter(getResources().getColor(R.color.moonPrimary));
    }
    egg = temp;
}
 
Example 4
Source File: Indicator.java    From XKnife-Android with Apache License 2.0 5 votes vote down vote up
private void stopAnimators() {
    if (mAnimators != null) {
        for (ValueAnimator animator : mAnimators) {
            if (animator != null && animator.isStarted()) {
                animator.removeAllUpdateListeners();
                animator.end();
            }
        }
    }
}
 
Example 5
Source File: BallPulseView.java    From AgentWebX5 with Apache License 2.0 5 votes vote down vote up
public void stopAnim() {
    if (mAnimators != null) {
        for (ValueAnimator animator : mAnimators) {
            if (animator != null && animator.isStarted()) {
                animator.removeAllUpdateListeners();
                animator.end();
            }
        }
    }
    setIndicatorColor(normalColor);
}
 
Example 6
Source File: DownloadProgressButton.java    From DownloadProgressButton with Apache License 2.0 5 votes vote down vote up
private void stopAnimators() {
    if (mAnimators != null) {
        for (ValueAnimator animator : mAnimators) {
            if (animator != null && animator.isStarted()) {
                animator.end();
            }
        }
    }
}
 
Example 7
Source File: Indicator.java    From LRecyclerView with Apache License 2.0 5 votes vote down vote up
private void stopAnimators() {
    if (mAnimators!=null){
        for (ValueAnimator animator : mAnimators) {
            if (animator != null && animator.isStarted()) {
                animator.removeAllUpdateListeners();
                animator.end();
            }
        }
    }
}
 
Example 8
Source File: BallPulseView.java    From TwinklingRefreshLayout with Apache License 2.0 5 votes vote down vote up
public void stopAnim() {
    if (mAnimators != null) {
        for (ValueAnimator animator : mAnimators) {
            if (animator != null && animator.isStarted()) {
                animator.removeAllUpdateListeners();
                animator.end();
            }
        }
    }
    setIndicatorColor(normalColor);
}
 
Example 9
Source File: BeerView.java    From BeerSwipeRefresh with Apache License 2.0 5 votes vote down vote up
@Override protected void onDetachedFromWindow() {
  if (mAlphaAnimator != null) {
    mAlphaAnimator.end();
    mAlphaAnimator.removeAllUpdateListeners();
  }
  for (ValueAnimator animator : mFrothAnimators) {
    if (animator != null) {
      animator.end();
      animator.removeAllUpdateListeners();
    }
  }
  super.onDetachedFromWindow();
}
 
Example 10
Source File: BeerView.java    From BeerSwipeRefresh with Apache License 2.0 5 votes vote down vote up
private void stopFrothAnimation() {
  for (ValueAnimator animator : mFrothAnimators) {
    if (animator != null) {
      animator.end();
    }
  }
  mFrothAnimators = new ValueAnimator[FROTH_NUM];
}