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" />
相关文章推荐
- android 用java代码设置布局、视图View的宽度/高度或自适应
- Android ImageView设置长度高度为wrap_content时高度根据图片比例自适应
- Android ImageView设置长度高度为wrap_content时高度根据图片比例自适应
- android ImageView 宽度设定,高度自适应
- Android基础UI之ImageView宽度设定,高度自适应
- Android ImageView设置长度高度为wrap_content时高度根据图片比例自适应
- Android 自定义imageview图片高度固定大小宽度按比例自适应
- Android 设置ImageView宽度固定,其高度按比例缩放适应
- Android进阶UI之ImageView设置长度高度为wrap_content时高度根据图片比例自适应
- android ImageView 宽度设定,高度自适应
- Android 自定义imageview 图片宽度固定大小高度按比例自适应
- android 用java代码设置布局、视图View的宽度/高度或自适应
- Android 设置ImageView宽度固定,其高度按比例缩放适应
- Android 自定义imageview 图片高度固定大小宽度按比例自适应
- Android UI之代码动态设置ImageView的宽度和高度
- Android 设置ImageView宽度固定,其高度按比例缩放适应
- Android 设置ImageView宽度固定,其高度按比例缩放适应
- android ImageView 宽度设定,高度自适应
- android imageview中 scaletype 与 宽度固定高度自适应
- 【Android】自定义ImageView高度自适应,宽度成比例缩放