Androidで次の構成の画像を表示するにはどうすればよいですか?
- 元のアスペクト比を保持します(画像は拡大縮小できますが、引き伸ばすことはできません)
- 親の幅を埋める
- 親の下部に配置
以下は機能しません。
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:layout_alignParentBottom="true"
android:src="@drawable/background" />
上記のxmlを使用すると、ImageViewは親の幅を取りますが、ImageView内の画像は取りません。