title: Check if all AsyncTasks have finished
body: <p>I have 3 <code>AsyncTasks</code> and 1 <code>ProgressBar</code>. I want when any of task executes, the progress bar is visible and when all of them finish, the progress bar is invisible.</p>
  
  <p>In Java, there is <code>ExecutorService::isTerminated</code> to check if all runnables finished but Android doesn't have it.</p>
  
  <p>Update: 3 tasks execute at the same time.</p>
  
  <p>Figure.
  <img src="https://i.stack.imgur.com/yXXCP.png" alt="enter image description here"></p>