title: RunOnUiThread not updating TextView
body: <p>I would like to write a real time counter. I tried to use thread, but android warned me that only activity thread may touch the view. I found a solution with <code>runOnUiThread</code>, but it does not work too</p>
  
  <pre><code>    public class CounterInRealTimeExampleActivity extends Activity {
          private TextView textView;
          /** Called when the activity is first created. */
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              LinearLayout layout = new LinearLayout(this);
              textView = new TextView(this);
              textView.setTag(new Integer(0));
  
              layout.addView(textView);
              setContentView(layout);
              runOnUiThread(new Runnable() {
  
                  @Override
                  public void run() {
                      //while(true)
                      {
                          try {
                              Thread.sleep(3000);
                          } catch (InterruptedException e) {
                              // TODO Auto-generated catch block
                              e.printStackTrace();
                          }
                          increment();
                      }
                  }
              });
          }
          public void increment() {
              textView.setTag(new Integer((Integer)textView.getTag())+1);
              textView.setText(Integer.toString((Integer)textView.getTag()));
          }
      }
  </code></pre>