属性名称 | 描述 | ||||||||||||||||||||||||||||||||
android:adjustViewBounds | 是否保持宽高比。需要与maxWidth、MaxHeight一起使用,否则单独使用没有效果。 | ||||||||||||||||||||||||||||||||
android:cropToPadding | 是否截取指定区域用空白代替。单独设置无效果,需要与scrollY一起使用。 | ||||||||||||||||||||||||||||||||
android:maxHeight | 设置View的最大高度,单独使用无效,需要与setAdjustViewBounds一起使用。如果想设置图片固定大小,又想保持图片宽高比,需要如下设置: 1) 设置setAdjustViewBounds为true; 2) 设置maxWidth、MaxHeight; 3) 设置设置layout_width和layout_height为wrap_content。 | ||||||||||||||||||||||||||||||||
android:maxWidth | 设置View的最大宽度。同上。 | ||||||||||||||||||||||||||||||||
android:scaleType | 设置图片的填充方式。
| ||||||||||||||||||||||||||||||||
android:src | 设置View的drawable(如图片,也可以是颜色,但是需要指定View的大小) | ||||||||||||||||||||||||||||||||
android:tint | 将图片渲染成指定的颜色。 |
欢迎光临 SuperIC社区_ (/) | Powered by Discuz! X3.3 |