title: Circle progress bar with countdown
body: <p>I have the following two programs <a href="http://www.skholingua.com/android-basic/user-interface/form-widgets/progressbar" rel="nofollow noreferrer">progress</a>, <a href="http://developer.android.com/reference/android/os/CountDownTimer.html" rel="nofollow noreferrer">countDownTimer</a> that works but need to combine them to achieve what I want.Please see the image below.</p>
  
  <p>I have the following issues.</p>
  
  <ol>
  <li><p>Progress bar not smooth</p></li>
  <li><p>Countdown time is going up and down and not counting down correctly</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  TextView tv2;
  ProgressBar pBar2;
  int pStatus = 0;
  private Handler handler = new Handler();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      tv2 = (TextView) findViewById(R.id.textView2);
      pBar2 = (ProgressBar) findViewById(R.id.progressBar2);
  
      new Thread(new Runnable() {
  
          @Override
          public void run() {
              // TODO Auto-generated method stub
             while (pStatus &lt; 100) {
                  pStatus += 1;
  
                  handler.post(new Runnable() {
  
                      @Override
                      public void run() {
  
                          new CountDownTimer(10000, 1000) {
                              @Override
                              public void onTick(long millisUntilFinished) {
                                  pBar2.setProgress(pStatus);
                                  tv2.setText("" + millisUntilFinished / 1000);
                              }
  
                              @Override
                              public void onFinish() {
                                  tv2.setText("Go!");
  
                              }
                          }.start();
                      }
                  });
                  try {
                      // Sleep for 200 milliseconds.
                      // Just to display the progress slowly
                      Thread.sleep(200);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
              }
          }
      }).start();
  }
  </code></pre></li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/YDx73.png" alt="enter image description here"></p>