title: Why cant a thread that is not the UI thread access the view?
body: <p>I know that no thread can access the current view unless it is the UI Thread. I am wondering why? Why does it matter which thread is changing the view? Is it a security reason? This is the work around I use:</p>
  
  <pre><code>        public void doLayout()
          {
              Runnable run = new Runnable()
              {
                  public void run()
                  {
                      ViewerActivity.setContentView(R.layout.main);
                  }
              };
  
              handler.post(run);
          }
  
          private Handler handler;'
  </code></pre>
  
  <p>It is kind of a pain to do that everytime i want to change the layout. Is there a different work around? I know about async task and i never found a good way to use it, is it better than what i'm doing? All relevent answers are appriciated!</p>