title: How to implement decreasing counter in textView.setText using for loop?
body: <p>I'm trying to implement a decreasing counter using for loop in android java. I have used handler &amp; runnable to delay for loop iteration and I want the counter to start from 80 and end on 0, but in output, I'm getting counter from 0 to 80. In short, the reverse is required.</p>
  <p>This is my code,</p>
  <pre><code>TextView totalpoints = (TextView) findViewById(R.id.txttotalpoints);
          Handler handler1 = new Handler();
  
          for (int count = 80;count&gt;=0; count--){
              int finalCount = count;
  
  
              handler1.postDelayed(new Runnable() {
  
                  @Override
                  public void run() {
                      totalpoints.setText(&quot;Total Points : &quot;+ finalCount);
                      System.out.println(&quot;This is in newpointsCounter&quot; + finalCount);
  
  
                  }
                  }, 1000 * count);
          }
  </code></pre>
  <p>Current output =&gt; Start from 0 &amp; end on 80</p>
  <p>Required output =&gt; Start from 80 &amp; end on 0</p>