title: How to create a count-up effect for a textView in Android
body: <p>I am working on an app that counts the number of questions marks in a few paragraphs of text.</p>
  
  <p>After the scanning is done (which takes no time at all) I would love to have the total presented after the number goes from 0 to TOTAL. So, for 10: 0,1,2,3,4,5,6,7,8,9 <em>10</em> and then STOP.</p>
  
  <p>I have tried a couple of different techniques:</p>
  
  <pre><code>                TextView sentScore = (TextView) findViewById(R.id.sentScore);
  
                  long freezeTime = SystemClock.uptimeMillis();
  
                  for (int i = 0; i &lt; sent; i++) {
                      if ((SystemClock.uptimeMillis() - freezeTime) &gt; 500) {
                          sentScore.setText(sent.toString());
                      }
                  }
  </code></pre>
  
  <p>Also I tried this:</p>
  
  <pre><code>    for (int i = 0; i &lt; sent; i++) { 
          // try {
              Thread.sleep(500);
  
          } catch (InterruptedException ie) {
              sentScore.setText(i.toString()); 
          } 
      }
  </code></pre>
  
  <p>I am sure these are both completely amateur attempts. Any help would be much-appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Richard</p>