设置ImageView的adjustViewBounds属性就好了,具体查阅adjustViewBounds的用法
<ImageView
android:id="@+id/img_1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/img_bg" />
本文介绍如何通过设置ImageView的adjustViewBounds属性来调整图片显示效果,并提供了一个具体的代码示例。

609

被折叠的 条评论
为什么被折叠?



