您的位置:首页 > 移动开发 > Android开发

Android ImageView设置宽度,高度自适应

2017-06-12 15:17 288 查看
设置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" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: