【问题标题】:ImageView scale to parent width and save image proportionImageView 缩放到父宽度并保存图片比例
【发布时间】:2015-02-27 12:25:42
【问题描述】:

问题如下图所示:

【问题讨论】:

  • 因为您的要求不是标准 scaleType 使用 scaleType="matrix" 并计算矩阵以满足您的需求
  • 如何计算矩阵?
  • 您可以使用preScale/postScale 方法,请参阅android.graphics.Matrix 文档了解更多信息

标签: android xml layout imageview scale


【解决方案1】:

你可以设置它的ScaleType。更多信息here

【讨论】:

    猜你喜欢
    • 2013-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-01
    • 2011-06-20
    • 1970-01-01
    相关资源
    最近更新 更多