2014-11-06 119 views
0

我從數組列表中提取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的完成的所有類型,如 「補父」, 「包內容」, 「匹配父」。但總是我在它裏面變得模糊的圖像。

回答

0

嘗試設置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