Question: I work on an Android application, and I just try to put a background on an empty activity by way of welcome in the application. In the overview of the xml file, the image is displayed, but when i try the app on the emulator or on my phone, she's not displayed. They have no error, I don't understand. Can someone help me please ?

```
public class MainActivity extends Activity {

private SQLiteDatabase db;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Intent i = new Intent(this, ListeContact.class);
    try
    {
        Thread.sleep(3000);
    }
    catch (InterruptedException e)
    {
        e.printStackTrace();
    }
    startActivity(i);
    this.finish();
}
}

```

activity\_main.xml : 

```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/fond">
</LinearLayout>

```

P.S. My image named fond.png is on 5 folder named drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xdpi and drawable-xxdpi.

Answer: 
```
final Handler handler = new Handler();
handler.postDelayed(new Runnable() 
{
  public void run() 
   {
     Intent intent= new Intent(MainActivity.this, ListeContact.class);
     startActivity(intent);
     finish();
   }
}, 3000);

```

I used your code and verified..
This is what i did to achieve that you need right now:

```
import android.os.Bundle;
import android.view.MotionEvent;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;

public class SplashScreen extends Activity {

    protected int _splashTime = 5000;
    private Thread splashTread;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash_screen);

        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        splashTread = new Thread() {
            @Override
            public void run() {
                try {
                    sleep(5000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                } finally {
                    startActivity(new Intent(SplashScreen.this,
                            Home.class));
                    finish();
                }
            }
        };
        splashTread.start();
    }

    @Override
    public boolean onTouchEvent(MotionEvent event)
    {
        if (event.getAction() == MotionEvent.ACTION_DOWN)
        {
            synchronized(splashTread)
            {
                    splashTread.notifyAll();
            }
        }
        return true;
    }
}

```

This is my activity\_splash\_screen.xml:

```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/splash"
    tools:context=".SplashScreen" >

</RelativeLayout>

```