L'ajout d'image d'arrière-plan à la liste dans Android?

Je suis en train d'ajouter une image de fond à une listActivity dans mon application. Cependant, avec le code que j'utilise l'image d'arrière-plan s'affiche sur chaque ligne unique plutôt que pour l'ensemble de la liste.

C'est le fichier xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8px" >

<ImageView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:src="@drawable/qbg1"/>

<TextView
    android:id="@+id/employeeID"
    android:layout_width="50px"
    android:layout_marginRight="20px"
    android:layout_height="wrap_content"
    android:textColor="@color/textColor"/>

<TextView
    android:id="@+id/employeeName"
    android:layout_width="wrap_content"
    android:layout_marginRight="10px"
    android:layout_height="wrap_content"
    android:layout_toRightOf="@id/employeeID"
    android:textColor="@color/textColor"/>


</RelativeLayout>
<ImageView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:src="@drawable/qbg1"/>

quelle est la meilleure approche pour ajouter une image d'arrière-plan pour l'activité? Je préfère le faire dans le fichier XML plutôt que par programmation.

OriginalL'auteur Kalimah Apps | 2011-08-17