title: How to run a Runnable thread in Android at defined intervals?
body: <p>I developed an application to display some text at defined intervals in the Android emulator screen. I am using the <code>Handler</code> class. Here is a snippet from my code:</p>
  
  <pre><code>handler = new Handler();
  Runnable r = new Runnable() {
      public void run() {
          tv.append("Hello World");               
      }
  };
  handler.postDelayed(r, 1000);
  </code></pre>
  
  <p>When I run this application the text is displayed only once. Why?</p>