title: progressbar not moving
body: <p>i've an audio app that plays/records samples. i've put a progressbar on the UI but when the sample is played the bar does not move or seem to increment with the sample. how do i get it to move?</p>
  
  <pre><code>mProgress = (ProgressBar) findViewById(R.id.progressBar1);
              // final long trackDuration = (musicLength/44100)*1000; // track duration in millisec
  
               // Start lengthy operation in a background thread
               new Thread(new Runnable() {
                   public void run() {
                       //Log.i("music length = ", trackDuration+"");
  
                       while (mProgressStatus &lt; musicLength) {
                           mProgressStatus = audioTrack.write(music, 0, musicLength);
  
                           // Update the progress bar
                           mHandler.post(new Runnable() {
                               public void run() {
                                   mProgress.setProgress(mProgressStatus);
  
                               }
                           });
                       }
                   }
               }).start();
  </code></pre>