Bonjour,
mon problème est purement esthétique, quand je crée mes onglets, ils sont rectangulaires alors que je vois de très jolis onglets arrondis: comment réussir à créer ces onglets à bords arrondis?
D'avance merci!
Version imprimable
Bonjour,
mon problème est purement esthétique, quand je crée mes onglets, ils sont rectangulaires alors que je vois de très jolis onglets arrondis: comment réussir à créer ces onglets à bords arrondis?
D'avance merci!
Bonjour,
Je ne sais pas si cela peut t'aider mais regarde tu côté des tabwidget
http://developer.android.com/referen...TabWidget.html
Je ne connais pas tout les procédures mais par exemple setDividerDrawable a l'air intéressante .
Sinon je pense que tu peux toujours touché à l'inflater de la tabwidget et le modifier directement .
Merci de ta réponse, je n'ai pas trouvé mon bonheur... et je ne comprends pas comment modifier l'inflater de la tabwidget (je débute...)
Je te remercie de ton aide!
ps: J'ai été sur http://developer.android.com/resourc...tabwidget.html et le résultat est exactement ce que j'attends et visiblement ils ne modifient rien de particulier! je comprends pas:
pour vous donner la preuve en image:
Pièce jointe 71981
au lieu de : http://developer.android.com/resourc...-tabwidget.png
Salut,
Je vais peut être dire des bétises, mais je crois que le composant pour gérer les tabs a été retravailler à partir de la version 2.0 (ou 2.1 ou 2.2 ^^) d'Android.
Du coup, en fonction de ta cible, tu n'auras peut être pas le même visuel.
Pourrais-tu préciser la version du SDK que tu utilises ?
Merci
Bonjour,
je ne crois pas que cela vienne de là, j'ai le sdk pour la version 2.2... une autre idée? :cry:
Salut,
Peux tu poster ton layout XML ?
Merci.
Code:
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139 <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:id="@+id/tab1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="5dp" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/mojito" android:padding="5dp" > <TextView android:id="@+id/Text01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Trouver Le Bon Mojito" android:textStyle="bold" android:textSize="18px" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="2dip" android:background="#666666" /> <TextView android:id="@+id/Text02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="www.lebonmojito.com" android:textSize="12px" /> <TextView android:id="@+id/Text03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" " android:textSize="10px" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp" > <Button android:id="@+id/button1" android:text="Par géolocalisation" android:layout_width="170px" android:layout_height="fill_parent" android:layout_weight="1" android:drawableLeft="@drawable/globe36" /> <Button android:id="@+id/button2" android:text="Par adresse" android:layout_width="170px" android:layout_height="fill_parent" android:layout_weight="1" android:drawableLeft="@drawable/car36" /> <Button android:id="@+id/button3" android:text="Paramètres" android:layout_width="170px" android:layout_height="fill_parent" android:layout_weight="1" android:drawableLeft="@drawable/equalizer36" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/adresse" android:layout_below="@+id/LinearLayout01" android:layout_centerHorizontal="true" android:layout_marginTop="10dip" /> </LinearLayout> </LinearLayout> <LinearLayout android:id="@+id/tab2" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" > <EditText android:id="@+id/EditText03" android:text="valeur 3" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:id="@+id/tab3" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" > <EditText android:id="@+id/EditText03" android:text="valeur 3" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </FrameLayout> </LinearLayout> </TabHost>
merci de ton aide!:ccool: