Android ImageView动态图片自适应宽高

来源:互联网 发布:matlab 稀疏矩阵求逆 编辑:程序博客网 时间:2024/04/20 14:16

马克

Android:adjustViewBounds

是否保持宽高比


1、

 <ImageView        android:id="@+id/img_head"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:adjustViewBounds="true"/>
2、
mImageView.setImageResource(R.mipmap.xx);

0 0
原创粉丝点击