在图像视图中显示来自URL的图像显示模糊(不清晰)的图像?

在图像视图中显示来自URL的图像显示模糊(不清晰)的图像?

问题描述:

我从数组列表中提取URL并在图像视图中显示它,但图像未被清除,或者您说它模糊。因为来自URL的图像是高清晰度的,观看后其尺寸与高清相同。在图像视图中显示来自URL的图像显示模糊(不清晰)的图像?

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) 

图像视图代码

<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" /> 

我已经imageview的完成的所有类型,如 “补父”, “包内容”, “匹配父”。但总是我在它里面变得模糊的图像。

尝试设置scaletype属性。我相信'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" /> 

请参阅此链接更多的缩放选项ScaleType

+0

@Ghost黑客是这个答案有用吗? :) – Smalesy 2014-11-10 10:48:08