title: Android wait() not working
body: <p>This is my first question here, so please forgive me if I disobeyed any of the forum rules.</p>
  
  <p>I need my program to wait for 3 seconds and then change the Content View</p>
  
  <p>My code is:</p>
  
  <pre><code>setContentView(R.layout.logout); 
  
  new Thread(new Runnable() { 
      @Override 
      public void run(){ 
          try { 
             synchronized(this){ 
                  wait(3000);
              } 
          } 
          catch(InterruptedException ex){                     
          }            
      } 
  }).start();
  
  setContentView(R.layout.main);
  </code></pre>
  
  <p>The program works with no errors, but there is no waiting. When it gets to this part, it just shows the "main" layout without showing the "logout" layout at all.</p>
  
  <p>What is wrong in my approach?</p>