![Android minHeight/Width,maxHeight/Width Android minHeight/Width,maxHeight/Width](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
在layout文件中,设置IamgeView的最大(最小)高度(宽度)时,需要同时设置android:adjustViewBounds="true",这样设置才会生效。在代码中设置时,需要setAdjustViewBounds为true。一个layout的实例:
android:adjustViewBounds="true"
android:maxHeight="150.0dip"
android:maxWidth="150.0dip"
android:minHeight="33.0dip"
android:minWidth="48.0dip"