title: Looper not called outside the Thread class
body: <p>I am learning how to use Looper and Handler class in android development
  <a href="http://developer.android.com/reference/android/os/Looper.html" rel="nofollow">http://developer.android.com/reference/android/os/Looper.html</a>
  The example given in the android development is not clear to understand what is the usage and the how to use it.I dont know how to add Handler inside the Looper and how I can call the Looper to loop.
  If it is available, can anyone give me a simple example to use it.</p>
  
  <pre><code>public class LooperTest extends Activity{
  
  public void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  }
  private class LooperTesting extends Thread
  {
      public Handler handler;
      public void run()
      {
          Looper.prepare();
          handler = new Handler()
          {
              public void handlerMessage(Message msg)
              {
                      // do something
              }
          };
          Looper.loop();
  
      }
  }
  }
  </code></pre>