[英]Showing Image from URL in the image view is showing blurred(not clear) image?
I am fetching url from the array-list and showing it in the image view but the image is not cleared or you say its blurred. 我正在从array-list中获取url并将其显示在图像视图中,但是图像未清除或您说图像模糊。 since the image coming from the URL is high-defination and after watching it its dimension is same as high definition.
由于来自网址的图片是高清图片,观看后其尺寸与高清图片相同。
String image_url = rowItem.getMediaUrl();// url of image
if (image_url != null && image_url.length() > 0)
imgLoader.DisplayImage(image_url, imageViewpostimage);
// showing image in the imageview (imageViewpostimage)
Image view code 图像查看代码
<ImageView
android:id="@+id/UserPostImage"
android:layout_width="350dp"
android:layout_height="250dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80dp"
android:src="@drawable/profile_photo" />
i have done imageview all type like "fill parent","wrap-content".,"match-parent". 我已经完成了imageview的所有类型,例如“填充父级”,“包装内容”,“匹配父级”。 but always i am getting blurred image in it.
但总是我在其中得到模糊的图像。
Try setting the scaletype property. 尝试设置scaletype属性。 I believe 'fitXY' will be most appropriate.
我相信“ fitXY”将是最合适的。
<ImageView
android:id="@+id/UserPostImage"
android:layout_width="350dp"
android:layout_height="250dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80dp"
android:scaleType="fitXY"
android:src="@drawable/profile_photo" />
See this link for more scaling options ScaleType 有关更多缩放选项, 请参见此链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.