bonjour,
Et oui encore une question simple mais qui me pose vraiment un problème de présentation dans mon application.
j'utilise un fichier view.xml pour réaliser une ligne d'une futur ListView :
Le soucis est que l'ImageButton n'apparait pas.
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 <?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:orientation= "horizontal"> <ImageView android:id="@+id/note" android:layout_width="wrap_content" android:paddingLeft="2px" android:paddingRight="2px" android:paddingTop="2px" android:layout_height="wrap_content" android:src="@drawable/star3" /> <TextView android:id="@+id/name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="40sp" /> <ImageButton android:id="@+id/next" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/next" /> </LinearLayout>
Le TextView en fill_parent ma mange toute la place avant de crée la place pour l'ImageButton.
Et si je met le TextView en wrap_content mes ImageButtons ne sont pas alignés. elles seront à la fin des TextViews et leur place dépendra du nombre de caractères.
quelqu'un aurai une astuce pour palier à ce problème?
J'ai déjà testé : horientation, gravity rien ne change des que je suis en fill_parent les widgets suivant n'apparaissent pas.
Partager