タブのコンテンツに背景(480x320)を使用しようとしました。xmlを描画可能として使用すると、画像を拡大縮小できるはずです。これは、tabhost/tabactivityの外部では正常に機能します。tabcontent内で使用しようとすると、scaleTypeが機能しません。彼は私が試したすべてのscaleTypeを無視します。
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>
res/drawableのbackground.xml
<?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"/>
当然のことながら、画像を変更してxmlが実際に使用されているかどうかを確認しました。画像が変更されたため、xmlが使用されます。
背景全体が表示されているが、アスペクト比が無視されているため、使用されているスケーリングはfitXYのようです。
いくつかのアイデア?