title: Threading is not working
body: <p>I want to show my splash.xml for 6 seconds and then activity_main.xml but it is not showing the activity_main.xml...</p>
  
  <p>my splash.java code:</p>
  
  <pre><code>    package com.example.ne;
  
      import android.app.Activity;
      import android.content.Intent;
      import android.os.Bundle;
  
      public class splash extends Activity{
  
       protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.splash);
              Thread timer = new Thread()
              {
                  public void run(){
                      try{
                          sleep(6000);
  
  
                      } catch(InterruptedException e){
                          e.printStackTrace();
  
                      }finally{
                          Intent open =new     Intent("com.example.ne.MAINACTIVITY");
                          startActivity(open);
                      }
                  }
              };
              timer.start();
  
       }
  
  
  }
  </code></pre>
  
  <p>and mainactivity.java code:</p>
  
  <pre><code>    package com.example.ne;
  
      import android.os.Bundle;
      import android.app.Activity;
      import android.view.Menu;
      import android.view.View;
      import android.widget.Button;
      import android.widget.TextView;
  
      public class MainActivity extends Activity {
  
  
      int counter;
      Button add,sub;
      TextView display;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          counter=0;
          add=(Button) findViewById(R.id.bAdd);
          sub=(Button)findViewById(R.id.bSub);
          display=(TextView)findViewById(R.id.tvdisplay);
          add.setOnClickListener(new View.OnClickListener() {
  
              @Override
  
              public void onClick(View arg0) {
                  counter++;
                  // TODO Auto-generated method stub
                  display.setText("Your total is" + counter);
  
              }
          });sub.setOnClickListener(new View.OnClickListener() {
  
              @Override
  
              public void onClick(View arg0) {
                  counter--;
                  display.setText("Your total is" + counter);
                  // TODO Auto-generated method stub
  
              }
          });
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
  
          getMenuInflater().inflate(R.menu.activity_main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>and manifest.xml code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.ne"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.ne.splash"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
   &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name=".MainActivity" android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.example.ne.MAINACTIVITY" /&gt;
  
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>