Bonjour,
Comment réaliser des onglets d'un tableau comme apparu dans l'image ci-jointe.
Merci
Version imprimable
Bonjour,
Comment réaliser des onglets d'un tableau comme apparu dans l'image ci-jointe.
Merci
Bonjour,
Essaye cela :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <?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="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <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" android:padding="5dp" /> </LinearLayout> </TabHost>
non les onglets s'affichent verticalement et non pas comme dans l'image
Arg , je me disais bien que c'était un peu trop simple
Une discussion intéressante sur le sujet ;).
http://code.google.com/p/android/issues/detail?id=3862
Donc faut le modifier dans le code :mrgreen:Citation:
Currently is possible call this
getTabWidget().setOrientation(LinearLayout.VERTICAL);
before adding tabs to TabHost