title: How to show a splash screen for 3 seconds on Android?
body: <p>I would like the splash image to begin and stay for 3 seconds, and then disappear and continue or be replaced with the rest of the layout in the main.xml.</p>
  
  <p>This is my code:</p>
  
  <p>Main.java</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.main);
  
      ImageView splash = (ImageView) this.findViewById(R.id.splash);
  </code></pre>
  
  <p>main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- margin=0px, padding=20px --&gt;
  &lt;!--textview padding=10dp, textSize=16sp--&gt;
  &lt;!--px=pixel, dp=density indepen sp=scale indepen fontsize preference --&gt;
  &lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;
  
     &lt;ImageView
      android:id="@+id/splash"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:src="@drawable/splash2"/&gt; 
  
    &lt;ImageView
      android:id="@+id/myImageView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/bg_main"/&gt; 
  
    &lt;ImageView
      android:id="@+id/myImageView0"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/bar_top"/&gt; 
  
  &lt;!-- 
    &lt;TextView android:id="@+id/textItem"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:paddingTop="10dp"
      android:paddingLeft="110dp"
      android:background="#00000000"
      android:textColor="#ffffffff"
      android:textSize="22sp" 
      android:text="Find Car"
      android:enabled="false"  
    &gt;
  --&gt;
  
  &lt;TabHost android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  &lt;RelativeLayout
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:padding="3dp"&gt;
     &lt;FrameLayout
         android:id="@android:id/tabcontent"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:layout_weight="1" /&gt;
     &lt;TabWidget
         android:id="@android:id/tabs"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_alignBottom = "@android:id/tabcontent"
         /&gt;
      &lt;/RelativeLayout&gt;
      &lt;/TabHost&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>