【问题标题】:Universal image loader image scale通用图像加载器图像比例
【发布时间】:2014-05-25 04:49:36
【问题描述】:

我在我的应用程序中使用通用图像加载器。

这是最好的图片下载库,但我有一个问题。

我下载的图片小于设备宽度。

我需要图像具有宽度 = 设备宽度和缩放高度。

知道我该怎么做吗?

【问题讨论】:

  • 只需检查属性 android:scaleType="fitXY"
  • 您可以使用android:scaleType="fitXY"android:scaleType="centerCrop" 作为您的ImageView
  • 你有你想要达到的目标吗@Unmerciful ????
  • 当图像分辨率小于设备宽度时,fitXY 缩放错误。 centercropp 裁剪我的图像.. 我在这里找到了解决方案:stackoverflow.com/questions/12982404/…

标签: android imageview universal-image-loader image-scaling


【解决方案1】:

你可以像这样使用 imageview

<ImageView
 android:id="@+id/imageView_clock"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:scaleType="centerCrop"
 android:src="@drawable/ic_icon" />

这取决于您从网络上获取的图像大小

 android:scaleType="centerCrop" // use this

【讨论】:

    猜你喜欢
    • 2017-04-07
    • 2015-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-12
    相关资源
    最近更新 更多