on peut pas mettre directement une image
Dans createTabView j'utilise le fichier xml : tabs_bg2 c'est lui qui insère l'image
view = LayoutInflater.from(context).inflate(R.drawable.tabs_bg2, null);
Dans le xml j'ai une image (c'est l'image home).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabsLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/image"//image home
android:layout_gravity="bottom|center"
/>
</LinearLayout> |
Partager