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一起使用

posted @ 2014-03-04 14:04  Qiengo  阅读(279)  评论(0编辑  收藏  举报