title: setContentView execute too late
body: <p>I have a problem, I make a simple application to show you my problem.
  I want that setContentView executes and displays the .xml BEFORE the Sleep is executed. I thought everything will be execute in order? 
  Is there anyone how can say me why it doesn't do that?</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          try {
              Thread.sleep(10000);
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          // do something
      }
  </code></pre>
  
  <p>Thanks a lot!</p>
  
  <p>EDIT:</p>
  
  <p>Here is the real OnCreate, seems to be a bigger problem.</p>
  
  <p>Everything with the sleep worked fine, but with the Connect method there are problems.</p>
  
  <p><i>
  public void onCreate(Bundle savedInstanceState) 
      {<br>
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);</p>
  
  <pre><code>ConnectBluetooth();
  
  }   
  </code></pre>
  
  <p></i>
  In the ConnectBluetooth() method, I just create a new Socket and try a connection.</p>
  
  <p>With a ned thread or a handler it doesn't seems to work, what should I do then? Use something like an asynctask?</p>
  
  <p>Thanks a lot in common!</p>