Bonjour à tous,
J'ai un problème de layout, j'ai créer un tableau avec 3 lignes pour y mettre les lettre de l'alphabet et les chiffres. j'ai placé dans les lignes des Button
1er lignes 13 lettres
2eme ligne 13 lettres
3eme ligne 10 chiffre
J'ai essayé toutes les propriétés de layout, wrap_content et match_parent. Je m'attendais à ce que les Button soient "souples" mais sur un smartphone on ne voit pas tous les Button sur une lignes (Exemple 1er ligne, on voit de A à J alors qu'on devrait voir de A à M)
Est ce que les Button ont une taille minimal (due à la taille du texte peut être) ?
Voici le code et un screenshot:
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
98
99
100
101
102
103
104
105 <TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="match_parent" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_parent" android:layout_height="match_parent" > <Button android:id="@+id/letter_a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="showLetter" android:text="A" /> <Button android:id="@+id/letter_b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="showLetter" android:text="B" /> <Button android:id="@+id/letter_c" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="showLetter" android:text="C" /> <Button android:id="@+id/letter_d" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="showLetter" android:text="D" /> <Button android:id="@+id/letter_e" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="E" /> <Button android:id="@+id/letter_f" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="F" /> <Button android:id="@+id/letter_g" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="G" /> <Button android:id="@+id/letter_h" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="H" /> <Button android:id="@+id/letter_i" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="I" /> <Button android:id="@+id/letter_j" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="J" /> <Button android:id="@+id/letter_k" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="K" /> <Button android:id="@+id/letter_l" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="L" /> <Button android:id="@+id/letter_m" android:layout_width="match_parent" android:layout_height="match_parent" android:onClick="showLetter" android:text="M" /> </TableRow> </TableLayout>
Merci filouxxx![]()
Partager