Пример #1
0
 public void onPause() {
   super.onPause();
   if (task != null) task.cancel();
 }
Пример #2
0
  private void setTask() {
    if (task != null) task.cancel();

    task = new ImageTask();
    timer.schedule(task, 5000, 5000);
  }