Android View Attributes

 

ImageView

  android:adjustViewBounds 

  Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.

  Note: If the application targets API level 17 or lower, adjustViewBounds will allow the drawable to shrink the view bounds, but not grow to fill available measured space in all cases. This is for compatibility with legacy MeasureSpec and RelativeLayout behavior.

  是否保持宽高比。需要与maxWidth、MaxHeight一起使用,否则单独使用没有效果。 

  android:cropToPadding 
  是否截取指定区域用空白代替。单独设置无效果,需要与scrollY一起使用

Android View Attributes,布布扣,bubuko.com

Android View Attributes

上一篇:Android 修改系统来电铃声


下一篇:android联系人同步相关随笔