List of usage examples for android.view.animation ScaleAnimation setFillAfter
public void setFillAfter(boolean fillAfter)
From source file:quickbeer.android.views.ProgressIndicatorBar.java
private void animateToEnd() { Timber.v("animateToEnd()"); checkNotNull(progressBar);//from w w w.j a va 2 s. com if (progressBar.getAnimation() == null) { // Non-active progress bar doesn't need end animation return; } ScaleAnimation animation = new ScaleAnimation(barScale, (getWidth() / (float) progressBarWidth) + 1, progressBar.getHeight(), progressBar.getHeight()); animation.setDuration(ANIMATION_END_SCALE_DURATION); animation.setFillAfter(true); animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { barScale = 1.0f; animateToHidden(); } }); progressBar.setVisibility(VISIBLE); progressBar.clearAnimation(); progressBar.startAnimation(animation); }
From source file:com.rodrigopontes.androidbubbles.BubblesManager.java
private void playScaleAnimation(ScaleAnimation scaleAnimation, int duration, BubbleBase bubble) { scaleAnimation.setDuration(duration); scaleAnimation.setFillAfter(true); bubble.getImageView().startAnimation(scaleAnimation); }