ImageView uploads high resolution image as very low quality

I use ListFragmentto display ListViewLazy Loaded objects ImageViewusing the Android Universal Image Loader . The correct data comes from my data source, and I have a URL for images with a fairly high resolution (about 1000 pixels wide, 150 kb). I use them to completely fill every line with a height of 110dp.

The problem I am facing is downloading images with very low resolution:

enter image description here

The problem is not in the original image, but in a fairly high quality:

http://www.puc.edu/__data/assets/image/0006/127581/IMG_5155.jpg

I center the image and then crop it:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:minHeight="110dp">

    <TextView
        android:id="@+id/galleryTitle"
        android:layout_width="wrap_content"
        android:layout_height="80dp"
        android:layout_marginLeft="95dp"
        android:layout_marginRight="5dp"
        android:gravity="center_vertical"
        android:hint="16dp"
        android:lineSpacingExtra="0dp"
        android:lines="3"
        android:text="TextView"
        android:textSize="16sp"
        android:textStyle="bold" />

    <ImageView
        android:id="@+id/galleryImageView"
        android:layout_width="fill_parent"
        android:layout_height="110dp"
        android:scaleType="centerCrop"
        android:src="@drawable/default_background" />

</RelativeLayout>

Display image in line:

public View getView(int position, View convertView, ViewGroup parent) {

        View itemView;
        TextView title;

        // Get the news item object
        PUCObjects.PUCPhotoGalleryItem item = items.get(position);

        // Inflater Service
        inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        itemView = inflater.inflate(R.layout.photos_gallery_row, parent, false);
        title = (TextView) itemView.findViewById(R.id.galleryTitle);
        ImageView imageView = (ImageView) itemView.findViewById(R.id.galleryImageView);

        // Set the Image
        imageLoader.DisplayImage(item.imageUrlExtraLarge, imageView);

        // Set the text
        title.setText(item.title);

        return itemView;
    }

, ?

+4
1

. , 2 . , .

:

DisplayImageOptions opts = new DisplayImageOptions.Builder().imageScaleType(ImageScaleType.NONE).build();

imageLoader.DisplayImage(item.imageUrlExtraLarge, imageView, opts);
+10

All Articles