Bonjour, pour un projet scolaire je dois développer une application android. J'ai choisi à un moment donné d'utiliser un fragment qui fait apparaître une liste de contacts et lorsqu'on clique sur un contact en particulier on affiche ses données avec un fichier JSON... Tout cela fonctionnait très bien jusqu'à ce que je commence à toucher un petit peu au layout de mon activité. J'ai voulu insérer un "Footer" et un "Header" et entre les deux il y aurait eu mon fragment. Dans la preview j'obtiens exactement ce que je souhaite mais lorsque je run l'appli sur mon téléphone j'obtiens juste une page toute blanche sans que l'application bug.

Voici le code de mon activité "activity_contact_list.xml" qui est composé de deux fichiers xml:
_"activity_contact_list.xml":

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:id="@+id/contact_list"
    android:name="com.directory.guillaume.directoryapplication.ContactListFragment"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    tools:context=".ContactListActivity" tools:layout="@android:layout/list_content" />
_"activity_contact_list.xml(sw600dp)":
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<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:divider="?android:attr/dividerHorizontal"
    android:orientation="horizontal"
    tools:context=".ContactListActivity">
 
    <!-- Header aligned to top -->
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:background="#9933CC"
        android:gravity="center" >
 
 
        <Button
            android:id="@+id/returnbtn"
            android:layout_width="50dp"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:background="@drawable/ic_action_back"/>
 
        <Button
            android:id="@+id/statusbtn"
            android:layout_width="50dp"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:background="@drawable/ic_action_user_add" />
 
    </RelativeLayout>
 
    <!-- Footer aligned to bottom -->
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/footer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="#9933CC"
        android:gravity="center" >
 
        <Button
            android:id="@+id/eventsbtn"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/groupsbtn"
            android:layout_alignParentTop="true"
            android:background="@drawable/ic_action_event" />
 
        <Button
            android:id="@+id/groupsbtn"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/contactsbtn"
            android:background="@drawable/ic_action_group"/>
 
        <Button
            android:id="@+id/contactsbtn"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/wallbtn"
            android:background="@drawable/ic_action_person" />
 
        <Button
            android:id="@+id/wallbtn"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:background="@drawable/ic_action_web_site"
            android:layout_width="50dp" />
 
    </RelativeLayout>
 
    <!-- Scrollable Content below header and above footer -->
    <!-- This layout is a two-pane layout for the Contacts master/detail flow. -->
 
    <fragment android:id="@+id/contact_list"
        android:name="com.directory.guillaume.directoryapplication.ContactListFragment"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/footer"
        android:layout_below="@id/header"
        tools:layout="@android:layout/list_content" />
 
    <FrameLayout android:id="@+id/contact_detail_container" android:layout_width="0dp"
        android:layout_height="fill_parent" />
 
</RelativeLayout>
Je ne vois absolument pas où est l'erreur, je pense que le problème se situe au niveau des balises <fragment android....> ou <FrameLayout.....>. Merci d'avance à toute personne qui pourrait m'aider!