List of usage examples for android.widget ProgressBar clearAnimation
public void clearAnimation()
From source file:io.github.carlorodriguez.morningritual.MainActivity.java
private void updateUIForNextStep(final TextView title, final int titleResId, final TextView quote, final int quoteResId, final ProgressBar progressBar, final MorningRitual morningRitual, final FloatingActionButton fab) { title.setText(getString(titleResId)); quote.setText(getString(quoteResId)); progressBar.clearAnimation(); mAnimator = setAnimation(progressBar, title, quote, morningRitual, fab); mAnimator.start();/*from w w w .j a v a2s . com*/ }
From source file:de.geeksfactory.opacclient.frontend.AccountEditActivity.java
public void setProgress(boolean show, boolean animate) { ProgressBar progress = (ProgressBar) findViewById(R.id.progressBar); View content = findViewById(R.id.svAccount); if (show) {/*from w w w .ja v a2 s . c om*/ if (animate) { progress.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in)); content.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out)); } else { progress.clearAnimation(); content.clearAnimation(); } progress.setVisibility(View.VISIBLE); content.setVisibility(View.GONE); } else { if (animate) { progress.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out)); content.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in)); } else { progress.clearAnimation(); content.clearAnimation(); } progress.setVisibility(View.GONE); content.setVisibility(View.VISIBLE); } }