Layout_width="fill_parent
「」とを使用 しLayout_height="wrap content"
ます。画像がImageViewよりも大きい場合、完全に縮小されます。
ただし、小さい画像をアップスケールするために機能させることはできませんでした。ScaleTypeと「AdjustViewBounds」の任意の組み合わせを試しました。画像ビューの中央で常に独自のサイズのままです。これがコードです...
<LinearLayout
android:id="@+id/LinearLayout02"
android:layout_height="wrap_content"
android:background="@drawable/content_bg"
android:orientation="vertical"
android:padding="5dp"
android:layout_width="fill_parent"
android:layout_marginLeft="1px">
<ImageView
android:layout_height="wrap_content"
android:src="@drawable/test"
android:id="@+id/ImageViewTest"
android:layout_width="fill_parent"
android:adjustViewBounds="true"
android:scaleType="center"></ImageView>
</LinearLayout>