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..
I believe the problem lies in the way you call the Thread.Sleep.
Try this code for a splash screen:

```
Handler handler = new Handler();
    handler.postDelayed(new Runnable() {
        @Override
        public void run() {
                startActivity(new Intent(getApplicationContext(),
                        ListeContact.class));
            finish();

        }
    }, 3000);

```