解决:
在 XML 中:需要和 android:adjustViewBounds="true"
一起使用才管用
在 Java 代码中,使用 imageView.setAdjustViewBounds(true);
详情解释见参考: Imageview.setAdjustViewBounds 用法
作者:sun_wenming
链接:https://www.jianshu.com/p/e48f3c3cd546
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。