我正在使用ListFragment来显示使用
Android Universal Image Loader的Lazy Loaded ImageView对象的ListView.正确的数据来自我的数据源,我有相当高分辨率图像的URL(大约1000px宽,150kb).我正在使用它们来完全填充110dp高的每一行.
我遇到的问题是图像加载的分辨率非常低:
问题不是源图像,因为它的质量足够高:
我将图像居中,然后裁剪它:
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="110dp">
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" />
android:id="@+id/galleryImageView"
android:layout_width="fill_parent"
android:layout_height="110dp"
android:scaleType="centerCrop"
android:src="@drawable/default_background" />
在行中显示图像:
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;
}
任何想法为什么它显示如此糟糕的分辨率图像?