Bonjour à tous,
J'ai un problème lorsque j'ajoute à mon fichier xml une image de fond.
Quand je ne mets pas de background mes boutons s'affiche bien au milieu de l'ecran au centre. Mais lorsque j'ajoute le background rien à faire les bouton remonte en haut de l'écran au centre. Voici mon fichier xml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"   
    android:orientation="vertical" 
    android:background="@drawable/fond_android2" <= c'est ici le probléme.
    >
 
 
        <Button
            android:id="@+id/btn_ajout"
            android:layout_width="110dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="Ajouter" />
 
         <Button
            android:id="@+id/btn_consuter"
            android:layout_width="110dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="Cousulter" />
          <Button
            android:id="@+id/btn_attente"
            android:layout_width="110dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="En Attente" />
 
 
</LinearLayout>

Je vous remercie d'avance de votre aide.