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,,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。