title: How to control the progressbar appear/disappear like loading in android fragment?
body: <p>I want to implement the loading progressbar when I read the file.</p>
  
  <p>For example , some <code>fileManager APP</code> will show the progressbar to denote loading when it read the file from SD card.</p>
  
  <p>I know it can use <code>android:fromDegrees="0" android:toDegrees="360"</code> to make the progressbar always turn.</p>
  
  <p>But in <code>Fragment</code>. How to show the progressbar(loading) when I want it appear. And close the <code>progressbar</code> when I want it disappear?</p>
  
  <p>The pseudo code like the following:</p>
  
  <pre><code>If( ReadingFile == true ) {
  
  //Show the progressbar
  
  }else if( ReadingFinish == true ){
  
  //Close the progressbar
  
  }
  </code></pre>
  
  <p>Should I write the <code>progressbar</code> to a <code>new Fragment</code>.
  If I want it to show , add the <code>fragment</code> ?</p>
  
  <p>or does there has other method to implement ?</p>