/**
  * Stops the animation thread. This method is invoked when the indeterminate animation should be
  * stopped. Reasons for this may include:
  *
  * <ul>
  *   <li>The progress bar changes to determinate
  *   <li>The progress bar is no longer part of a displayable hierarchy
  *   <li>This UI in uninstalled
  * </ul>
  *
  * If you implement your own animation thread, you must override this method.
  *
  * @since 1.4
  * @see #startAnimationTimer
  */
 protected void stopAnimationTimer() {
   if (animator != null) {
     animator.stop();
   }
 }
Ejemplo n.º 2
0
 // Start/stop animation
 public void setAnimation(boolean on) {
   if (on) animator.start();
   else animator.stop();
 }