目录
ImageView
继承自view
显示一个任意的图像,并提供各种显示选项
xml属性
android:src 设置View的drawable(注意要指定View的大小)
android:adjustViewBounds 是否保持宽高比 必须要配合👇使用
android:maxHeight 设置最大高度 必须要配合👆使用
scaleType属性
android:scaleType属性
测试环境:
matrix
fixXY
fitStart
fitCenter
fitEnd
center
centerCrop
centerInside
android:tint 染成指定颜色
也可以在代码里进行设置