I tried to use a background (480x320) for my tab content. Using a xml as drawable, I should be able to scale the image. This works fine outside the tabhost/tabactivity. If I try to use it inside the tabcontent, the scaleType doesn't work. He ignores every scaleType I tried.
tabcontent:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background">
<include layout="@layout/main_list" />
</RelativeLayout>
background.xml in res/drawable
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/background_img"
android:scaleType="centerInside"/>
Of couse I checked if the xml is really used by changing the image, at the image changed so the xml is used.
The used scaling seems to be fitXY, because the whole background is visible but the aspect ration is ignored.
Some ideas?