Bonjour !
J'essaie de faire une boîte de dialogue qui serait de la forme
J'ai donc fait unCode:
1
2
3
4Titre Toolbar avec 3 boutons liste de single choice bouton ok - bouton annuler
et unCode:builder.setView(ma_toolbar)
.Code:builder.setSingleChoiceItems(...)
Ça fonctionne bien à un détail prêt, j'obtiens :
Peut-on inverser la liste et la toolbar ?Code:
1
2
3
4Titre liste de single choice Toolbar avec 3 boutons bouton ok - bouton annuler
J'ai tenté aussi de définir la Dialog moi même
mais la liste reste vide alors qu'avec setSingleChoiceItems ça fonctionne, le Cursor étant évidemment le même dans mes différents essaisCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 <?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="fill_parent"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/create_info" android:text="@string/create" style="@style/FormButton" /> <Button android:id="@+id/del_info" android:text="@string/delete" style="@style/FormButton" /> <Button android:id="@+id/edit_info" android:text="@string/edit" style="@style/FormButton" /> </LinearLayout> <ScrollView android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content"> <ListView android:id="@+id/info_list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:choiceMode="singleChoice"> </ListView> </ScrollView> </LinearLayout>