Java Code Examples for android.animation.AnimatorSet#cancel()
The following examples show how to use
android.animation.AnimatorSet#cancel() .
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: ChannelAdminLogActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private void hideFloatingDateView(boolean animated) { if (floatingDateView.getTag() != null && !currentFloatingDateOnScreen && (!scrollingFloatingDate || currentFloatingTopIsNotMessage)) { floatingDateView.setTag(null); if (animated) { floatingDateAnimation = new AnimatorSet(); floatingDateAnimation.setDuration(150); floatingDateAnimation.playTogether(ObjectAnimator.ofFloat(floatingDateView, "alpha", 0.0f)); floatingDateAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (animation.equals(floatingDateAnimation)) { floatingDateAnimation = null; } } }); floatingDateAnimation.setStartDelay(500); floatingDateAnimation.start(); } else { if (floatingDateAnimation != null) { floatingDateAnimation.cancel(); floatingDateAnimation = null; } floatingDateView.setAlpha(0.0f); } } }
Example 2
Source File: ChannelAdminLogActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private void hideFloatingDateView(boolean animated) { if (floatingDateView.getTag() != null && !currentFloatingDateOnScreen && (!scrollingFloatingDate || currentFloatingTopIsNotMessage)) { floatingDateView.setTag(null); if (animated) { floatingDateAnimation = new AnimatorSet(); floatingDateAnimation.setDuration(150); floatingDateAnimation.playTogether(ObjectAnimator.ofFloat(floatingDateView, "alpha", 0.0f)); floatingDateAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (animation.equals(floatingDateAnimation)) { floatingDateAnimation = null; } } }); floatingDateAnimation.setStartDelay(500); floatingDateAnimation.start(); } else { if (floatingDateAnimation != null) { floatingDateAnimation.cancel(); floatingDateAnimation = null; } floatingDateView.setAlpha(0.0f); } } }
Example 3
Source File: FMView.java From Android-Music-Player with MIT License | 6 votes |
public void setRipple(boolean b) { rippleSet = b; if(height > width){ supportPixle = height; }else{ supportPixle = width; } if(rippleSet){ Set = new AnimatorSet(); Set.setStartDelay(0); }else{ if(Set != null) { Set.cancel(); Set.setStartDelay(0); Set = null; } } }
Example 4
Source File: FMlyt.java From Android-Music-Player with MIT License | 6 votes |
public void setRipple(boolean b) { rippleSet = b; if(height > width){ supportPixle = height; }else{ supportPixle = width; } if(rippleSet){ Set = new AnimatorSet(); Set.setStartDelay(0); mBitmapPaint = new Paint(); mBitmapPaint.setAntiAlias(true); mBitmapPaint.setColor(0xFFFFFFFF); }else{ if(Set != null) { Set.cancel(); Set.setStartDelay(0); Set = null; } mBitmapPaint = null; } }
Example 5
Source File: ChannelAdminLogActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
private void hideFloatingDateView(boolean animated) { if (floatingDateView.getTag() != null && !currentFloatingDateOnScreen && (!scrollingFloatingDate || currentFloatingTopIsNotMessage)) { floatingDateView.setTag(null); if (animated) { floatingDateAnimation = new AnimatorSet(); floatingDateAnimation.setDuration(150); floatingDateAnimation.playTogether(ObjectAnimator.ofFloat(floatingDateView, "alpha", 0.0f)); floatingDateAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (animation.equals(floatingDateAnimation)) { floatingDateAnimation = null; } } }); floatingDateAnimation.setStartDelay(500); floatingDateAnimation.start(); } else { if (floatingDateAnimation != null) { floatingDateAnimation.cancel(); floatingDateAnimation = null; } floatingDateView.setAlpha(0.0f); } } }
Example 6
Source File: ChannelAdminLogActivity.java From Telegram with GNU General Public License v2.0 | 6 votes |
private void hideFloatingDateView(boolean animated) { if (floatingDateView.getTag() != null && !currentFloatingDateOnScreen && (!scrollingFloatingDate || currentFloatingTopIsNotMessage)) { floatingDateView.setTag(null); if (animated) { floatingDateAnimation = new AnimatorSet(); floatingDateAnimation.setDuration(150); floatingDateAnimation.playTogether(ObjectAnimator.ofFloat(floatingDateView, "alpha", 0.0f)); floatingDateAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (animation.equals(floatingDateAnimation)) { floatingDateAnimation = null; } } }); floatingDateAnimation.setStartDelay(500); floatingDateAnimation.start(); } else { if (floatingDateAnimation != null) { floatingDateAnimation.cancel(); floatingDateAnimation = null; } floatingDateView.setAlpha(0.0f); } } }
Example 7
Source File: FeedItemAnimator.java From InstaMaterial with Apache License 2.0 | 5 votes |
@Override public void endAnimations() { super.endAnimations(); for (AnimatorSet animatorSet : likeAnimationsMap.values()) { animatorSet.cancel(); } }