src
должен растягивать свою ширину до match_parent
, сохраняя соотношение сторон. Когда изображение больше родительского, оно масштабируется правильно. Но когда изображение меньше, оно не масштабируется. (иллюстрация показывает желаемое поведение).
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:src="@drawable/foo"
/>
</RelativeLayout>
Использование ScaleType.fitXY
растягивает только width