salut j'ai crée une listeview mais le probléme j'ai une erreur dans List view
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 SimpleAdapter mSchedule = new SimpleAdapter (this.getBaseContext(), listItem, R.layout.affichageitem, new String[] {"img", "titre", "description"}, new int[] {R.id.img, R.id.titre, R.id.description});
Uploaded with ImageShack.us
voila les deux 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 <?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" > <EditText android:id="@+id/password" android:password="true" android:layout_height="wrap_content" android:layout_width="fill_parent" android:inputType="textPassword|number"> </EditText> <Button android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/ok" android:hint="Entrez des chiffres" android:digits="0123456789" android:maxLines="1" android:maxLength="5" android:inputType="phone|number" android:typeface="monospace" android:text="Enter"></Button> <ListView android:layout_height="wrap_content" android:id="@+id/listView1" android:layout_width="fill_parent"></ListView> </LinearLayoutsi vous plait une autre question comment je crée une sous liste par exemple si je clique sur 1 ére choix je trouve une autre liste
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 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageView android:id="@+id/img" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:padding="10px" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:paddingLeft="10px" android:layout_weight="1" > <TextView android:id="@+id/titre" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textSize="16px" android:textStyle="bold" /> <TextView android:id="@+id/description" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> </LinearLayout>
merci
Partager