android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/res_version_bg" />

如果希望ImageView调整其边界,请将此设置为true 以保持其可拉伸的长宽比

  
把图片按比例扩大/缩小到View的宽度,显示在View的上部分位置
android:scaleType="fitXY"

更多相关文章

  1. 自定义Dialog步骤
  2. [Android]使用RecyclerView替代ListView(三)
  3. Android(安卓)抽屉效果
  4. LocationManager的使用
  5. android百度地图
  6. StickyScrollView解说
  7. Android(安卓)CheckBox实现SwitchButton
  8. ConstraintLayout约束布局属性
  9. Android——基于ConstraintLayout实现的可拖拽位置控件

随机推荐

  1. Android Toolchain与Bionic Libc
  2. Android onSaveInstanceState()和onResto
  3. Port SDL/TinySDGL to android with nati
  4. 【Android】- Android Service的两种启动
  5. ListView去掉中间的分割线和设置Item之间
  6. android sax xml
  7. Android上传图片(PHP服务器)
  8. 申请Google Map密钥
  9. Android 触摸事件处理机制
  10. Android中Intent的各种常见作用。