Salut,
la question est toute simple. Dans un tabhost on trouve dans différents exemples des onglets avec une image et un text.
Je voudrais seulement afficher un texte mais le probème c'est qu'il est centré horizontalement mais pas verticalement (il est en bas de l'onglet).
J'ai testé basiquement : android:layout_gravity="center" dans le framelayout, mais ça ne marche pas.
Quelqu'un a une idée ?
Voici mon xml.
Merci
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"?> <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" android:layout_gravity="center"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center"> </FrameLayout> </LinearLayout> </TabHost>
Partager