Here are the examples of the java api android.animation.AnimatorSet.cancel() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
275 Examples
19
Source : PeekView.java
with Apache License 2.0
from Yuloran
with Apache License 2.0
from Yuloran
/**
* Cancels the animation. See {@link android.animation.Animator#cancel()}.
*/
public void cancelPeekAnimation() {
if (isPeekAnimationRunning()) {
mPeekAnimator.cancel();
} else {
clear();
}
}
19
Source : AnimationManager.java
with Apache License 2.0
from Yuloran
with Apache License 2.0
from Yuloran
/**
* Cancels on-going flash animation and capture animation, if any.
*/
public void cancelAnimations() {
// End the previous animation if the previous one is still running
if (mFlashAnim != null && mFlashAnim.isRunning()) {
mFlashAnim.cancel();
}
if (mCaptureAnimator != null && mCaptureAnimator.isStarted()) {
mCaptureAnimator.cancel();
}
}
19
Source : InkPageIndicator.java
with Apache License 2.0
from yongjhih
with Apache License 2.0
from yongjhih
private void cancelJoiningAnimations() {
if (joiningAnimationSet != null && joiningAnimationSet.isRunning()) {
joiningAnimationSet.cancel();
}
}
19
Source : BaseViewAnimator.java
with Apache License 2.0
from yibulaxi
with Apache License 2.0
from yibulaxi
public void cancel() {
mAnimatorSet.cancel();
}
19
Source : EnterScreenAnimations.java
with Apache License 2.0
from yangchong211
with Apache License 2.0
from yangchong211
public void cancelRunningAnimations() {
if (mEnteringAnimation != null) {
// cancel existing animation
mEnteringAnimation.cancel();
}
}
19
Source : MaterialRippleLayout.java
with Apache License 2.0
from yangchong211
with Apache License 2.0
from yangchong211
private void cancelAnimations() {
if (rippleAnimator != null) {
rippleAnimator.cancel();
rippleAnimator.removeAllListeners();
}
if (hoverAnimator != null) {
hoverAnimator.cancel();
}
}
19
Source : WinkDotView.java
with Apache License 2.0
from uDevel
with Apache License 2.0
from uDevel
@Override
public void stopDotAnimation() {
if (animatorSet != null) {
animatorSet.isStarted();
animatorSet.cancel();
}
}
19
Source : SlidingDotView.java
with Apache License 2.0
from uDevel
with Apache License 2.0
from uDevel
@Override
public void stopDotAnimation() {
if (animatorDisappearSet != null && animatorDisappearSet.isStarted()) {
animatorDisappearSet.cancel();
}
if (animatorAppearSet != null && animatorAppearSet.isStarted()) {
animatorAppearSet.cancel();
}
}
19
Source : GrowDotView.java
with Apache License 2.0
from uDevel
with Apache License 2.0
from uDevel
@Override
public void stopDotAnimation() {
if (isAnimating()) {
animatorSet.cancel();
}
}
19
Source : EditTextBoldCursor.java
with GNU General Public License v2.0
from TelePlusDev
with GNU General Public License v2.0
from TelePlusDev
public void setTransformHintToHeader(boolean value) {
if (transformHintToHeader == value) {
return;
}
transformHintToHeader = value;
if (headerTransformAnimation != null) {
headerTransformAnimation.cancel();
headerTransformAnimation = null;
}
}
19
Source : DrawerLayoutContainer.java
with GNU General Public License v2.0
from TelePlusDev
with GNU General Public License v2.0
from TelePlusDev
public void cancelCurrentAnimation() {
if (currentAnimation != null) {
currentAnimation.cancel();
currentAnimation = null;
}
}
19
Source : BottomSheet.java
with GNU General Public License v2.0
from TelePlusDev
with GNU General Public License v2.0
from TelePlusDev
private void cancelSheetAnimation() {
if (currentSheetAnimation != null) {
currentSheetAnimation.cancel();
currentSheetAnimation = null;
}
}
19
Source : AnimationEngine.java
with Apache License 2.0
from TaoPaox
with Apache License 2.0
from TaoPaox
public void cancel() {
if (animationSet != null) {
animationSet.cancel();
}
}
19
Source : MicrophoneView.java
with Apache License 2.0
from solrex
with Apache License 2.0
from solrex
public void animateRadius(float radius) {
if (radius <= mCurrentRadius) {
return;
}
if (radius > mMaxRadius) {
radius = mMaxRadius;
} else if (radius < mMinRadius) {
radius = mMinRadius;
}
if (radius == mCurrentRadius) {
return;
}
if (mAnimatorSet.isRunning()) {
mAnimatorSet.cancel();
}
mAnimatorSet.playSequentially(ObjectAnimator.ofFloat(this, "CurrentRadius", getCurrentRadius(), radius).setDuration(50), ObjectAnimator.ofFloat(this, "CurrentRadius", radius, mMinRadius).setDuration(600));
mAnimatorSet.start();
}
19
Source : BoomOcrActivity.java
with Apache License 2.0
from SmartisanTech
with Apache License 2.0
from SmartisanTech
private void stopCircleAnimation() {
if (null != mCircleAnimation) {
mCircleAnimation.cancel();
mCircleAnimation = null;
}
mCircleAnimating = false;
}
19
Source : BoomOcrActivity.java
with Apache License 2.0
from SmartisanTech
with Apache License 2.0
from SmartisanTech
private void stopTouchAnimation() {
if (null != mTouchAnimation) {
mTouchAnimation.cancel();
mTouchAnimation = null;
}
mTouchAnimating = false;
}
19
Source : BoomOcrActivity.java
with Apache License 2.0
from SmartisanTech
with Apache License 2.0
from SmartisanTech
private void stopLoopAnimation() {
if (null != mLoopAnimation) {
mLoopAnimation.cancel();
mLoopAnimation = null;
}
mLoopAnimating = false;
}
19
Source : SDCircleMove.java
with Apache License 2.0
from SiberiaDante
with Apache License 2.0
from SiberiaDante
public void startLoad() {
animatorSet.cancel();
}
19
Source : SDCircleMove.java
with Apache License 2.0
from SiberiaDante
with Apache License 2.0
from SiberiaDante
/**
* 在View销毁时停止动画
*/
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (animatorSet.isRunning()) {
animatorSet.cancel();
}
}
19
Source : SDCircleMove.java
with Apache License 2.0
from SiberiaDante
with Apache License 2.0
from SiberiaDante
public void stopLoad() {
animatorSet.cancel();
}
19
Source : CoffeeView.java
with MIT License
from samlss
with MIT License
from samlss
/**
* Stop animation.
*/
public void stop() {
if (mAnimatorSet != null && mAnimatorSet.isRunning()) {
mAnimatorSet.cancel();
mAnimatorSet = null;
}
}
19
Source : FloatingMenuAnimationHandler.java
with Apache License 2.0
from rjsvieira
with Apache License 2.0
from rjsvieira
public void cancelMenuAnimations() {
if (openingAnimation != null) {
openingAnimation.cancel();
openingAnimation = null;
}
if (closingAnimation != null) {
closingAnimation.cancel();
closingAnimation = null;
}
}
19
Source : PointAnimView.java
with Apache License 2.0
from REBOOTERS
with Apache License 2.0
from REBOOTERS
public void stopAnimation() {
if (animSet != null) {
animSet.cancel();
this.clearAnimation();
}
}
19
Source : TBNAnimationView.java
with MIT License
from nt-team
with MIT License
from nt-team
public void clear() {
// this.clearAnimation();
if (animatorSet != null) {
animatorSet.cancel();
}
}
19
Source : AnimationRunner.java
with Apache License 2.0
from novoda
with Apache License 2.0
from novoda
void cancelCurrentAnimations() {
animatorSet.cancel();
}
19
Source : PullForegroundDrawable.java
with GNU General Public License v3.0
from NekoX-Dev
with GNU General Public License v3.0
from NekoX-Dev
public void showHidden() {
if (outAnimator != null) {
outAnimator.removeAllListeners();
outAnimator.cancel();
}
setOutProgress(0f);
isOut = false;
animateOut = false;
}
19
Source : ProximitySheet.java
with GNU General Public License v3.0
from NekoX-Dev
with GNU General Public License v3.0
from NekoX-Dev
private void cancelSheetAnimation() {
if (currentSheetAnimation != null) {
currentSheetAnimation.cancel();
currentSheetAnimation = null;
currentSheetAnimationType = 0;
}
}
19
Source : ProximitySheet.java
with GNU General Public License v3.0
from NekoX-Dev
with GNU General Public License v3.0
from NekoX-Dev
private void cancelCurrentAnimation() {
if (currentAnimation != null) {
currentAnimation.cancel();
currentAnimation = null;
}
}
19
Source : PhotoCropView.java
with GNU General Public License v3.0
from NekoX-Dev
with GNU General Public License v3.0
from NekoX-Dev
public void cancelThumbAnimation() {
if (thumbAnimation != null) {
thumbAnimation.cancel();
thumbAnimation = null;
thumbImageVisible = false;
}
}
19
Source : EllipsizeSpanAnimator.java
with GNU General Public License v3.0
from NekoX-Dev
with GNU General Public License v3.0
from NekoX-Dev
public void onDetachedFromWindow() {
attachedToWindow = false;
ellAnimator.cancel();
}
19
Source : DiagramSettings.java
with GNU General Public License v3.0
from michelesalvador
with GNU General Public License v3.0
from michelesalvador
private void indicator(SeekBar seekBar) {
int i = seekBar.getProgress();
((TextView) indicator.findViewById(R.id.settings_indicator_text)).setText(String.valueOf(converti(i)));
int width = seekBar.getWidth() - seekBar.getPaddingLeft() - seekBar.getPaddingRight();
float x = (seekBar.getX() + seekBar.getPaddingLeft() + width / 9f * i) - indicator.getWidth() / 2f;
indicator.setX(x);
indicator.setY(seekBar.getY() - indicator.getHeight());
anima.cancel();
anima.start();
}
19
Source : SimilarLoadingView.java
with Apache License 2.0
from mbakgun
with Apache License 2.0
from mbakgun
private void stopAnimation() {
actualProgress = 0;
if (indeterminateAnimator != null) {
indeterminateAnimator.cancel();
indeterminateAnimator = null;
}
}
19
Source : FlatPlayerPlaybackControlsFragment.java
with GNU General Public License v3.0
from MaxFour
with GNU General Public License v3.0
from MaxFour
public void hide() {
if (musicControllerAnimationSet != null) {
musicControllerAnimationSet.cancel();
}
prepareForAnimation(playPauseButton);
prepareForAnimation(nextButton);
prepareForAnimation(prevButton);
prepareForAnimation(shuffleButton);
prepareForAnimation(repeatButton);
hidden = true;
}
19
Source : ClearTextEndIconDelegate.java
with Apache License 2.0
from material-components
with Apache License 2.0
from material-components
private void animateIcon(boolean show) {
boolean shouldSkipAnimation = textInputLayout.isEndIconVisible() == show;
if (show && !iconInAnim.isRunning()) {
iconOutAnim.cancel();
iconInAnim.start();
if (shouldSkipAnimation) {
iconInAnim.end();
}
} else if (!show) {
iconInAnim.cancel();
iconOutAnim.start();
if (shouldSkipAnimation) {
iconOutAnim.end();
}
}
}
19
Source : AllAppsTransitionController.java
with GNU General Public License v3.0
from LawnchairLauncher
with GNU General Public License v3.0
from LawnchairLauncher
private void cancelAnimation() {
if (mCurrentAnimation != null) {
mCurrentAnimation.cancel();
mCurrentAnimation = null;
}
cancelDiscoveryAnimation();
}
19
Source : AllAppsTransitionController.java
with GNU General Public License v3.0
from LawnchairLauncher
with GNU General Public License v3.0
from LawnchairLauncher
public void cancelDiscoveryAnimation() {
if (mDiscoBounceAnimation == null) {
return;
}
mDiscoBounceAnimation.cancel();
mDiscoBounceAnimation = null;
}
19
Source : libraryHome.java
with MIT License
from KishanV
with MIT License
from KishanV
void stopAnim() {
Set.cancel();
isOpen = false;
}
19
Source : thumbSlider.java
with MIT License
from KishanV
with MIT License
from KishanV
@Override
public void onDown(MotionEvent event) {
DonwX = event.getX();
DonwY = event.getY();
if (Set != null) {
if (Set.isRunning()) {
Set.cancel();
exPixle = 0;
}
}
super.onDown(event);
}
19
Source : eqlizerMenu.java
with MIT License
from KishanV
with MIT License
from KishanV
public void stopAnim() {
Set.cancel();
isOpen = false;
}
19
Source : Lead.java
with Apache License 2.0
from jsyjst
with Apache License 2.0
from jsyjst
public void cancel() {
if (animatorSet != null) {
animatorSet.cancel();
}
}
19
Source : RoundButton.java
with MIT License
from JMaroz
with MIT License
from JMaroz
private void stopMorphing() {
if (morpSet != null && morpSet.isRunning()) {
morpSet.cancel();
}
}
19
Source : CircularAnimatedDrawable.java
with MIT License
from JMaroz
with MIT License
from JMaroz
/**
* Stops the animation
*/
@Override
public void stop() {
if (!isRunning()) {
return;
}
mRunning = false;
mAnimatorSet.cancel();
}
19
Source : LoadingFlashView.java
with Apache License 2.0
from jiyouliang
with Apache License 2.0
from jiyouliang
public void hideLoading() {
if (mAnimatorSet == null)
return;
if ((!mAnimatorSet.isRunning()) && (!mAnimatorSet.isStarted()))
return;
mAnimatorSet.removeAllListeners();
mAnimatorSet.cancel();
mAnimatorSet.end();
}
19
Source : WindowHelper.java
with Apache License 2.0
from jiajunhui
with Apache License 2.0
from jiajunhui
private void cancelShowAnimation() {
if (mShowAnimatorSet != null) {
mShowAnimatorSet.cancel();
mShowAnimatorSet.removeAllListeners();
}
}
19
Source : WindowHelper.java
with Apache License 2.0
from jiajunhui
with Apache License 2.0
from jiajunhui
private void cancelCloseAnimation() {
if (mCloseAnimatorSet != null) {
mCloseAnimatorSet.cancel();
mCloseAnimatorSet.removeAllListeners();
}
}
19
Source : MovingViewAnimator.java
with Apache License 2.0
from JaynmBo
with Apache License 2.0
from JaynmBo
public void cancel() {
if (isRunning) {
mAnimatorSet.removeListener(animatorListener);
mAnimatorSet.cancel();
currentState = MovingState.stop;
}
}
19
Source : CatLoadingDialog.java
with Apache License 2.0
from HeYongRui
with Apache License 2.0
from HeYongRui
private void stopRotateAnim() {
if (mAnimatorSet == null || !mAnimatorSet.isRunning())
return;
mAnimatorSet.cancel();
}
19
Source : RxShapeLoadingView.java
with Apache License 2.0
from hexingbo
with Apache License 2.0
from hexingbo
private void stopLoading() {
if (mAnimatorSet != null) {
if (mAnimatorSet.isRunning()) {
mAnimatorSet.cancel();
}
mAnimatorSet = null;
}
this.removeCallbacks(mFreeFallRunnable);
}
19
Source : LoadMoreModel.java
with Apache License 2.0
from gejiaheng
with Apache License 2.0
from gejiaheng
@Override
public void unbind(LoadMoreHolder holder) {
super.unbind(holder);
if (animatorSet != null) {
animatorSet.cancel();
}
}
19
Source : ObjectDotAnimator.java
with Apache License 2.0
from FirebaseExtended
with Apache License 2.0
from FirebaseExtended
void cancel() {
animatorSet.cancel();
radiusScale = 0f;
alphaScale = 0f;
}
See More Examples