android - ImageView loading high resolution image as very poor quality -
I use ListFragment
to display the ListView
of a loaded load I am using the correct code using the ImageView
objects coming from my datasource and I have a URL for my very high resolution images (about 1000 pixels, 150kb). I'm using completely to fill every row completely, which is 110dp high.
The problem I am having is loading images at very low resolutions:
The problem is not the source image because it is high enough quality:
I am focusing the image And then I'm harvesting it:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" android: layout_height = "match_parent" android: minHeight = "110dp" & gt; & Lt; Android: layout_marginLeft = "95dp" Android: layout_marginRight = "5dp" android: gravity = "center_vertical" android: indication: textView android: id = "@ + id / galleryTitle" Android: layout_width = "wrap_content" Android: layout_height = "80dp" Android: text = "16dp" Android: lineSpacingExtra = "0dp" Android: lines = "3" Android: text = "TextView" Android: textSize = "16sp" Android: Text-style = "bold" /> & Lt; Android: layout_heid = "110dp" Android: scaleType = "centerCrop" Android: src = "@ drawable / default_background" /> & Lt; / RelativeLayout & gt;
Display image in line:
see public getView (see the status of int, viewview, viewgroup parent) {see item view; Textview title; // Get News Object Object PUCObjects.PUCPhotoGalleryItem Item = items.get (status); // Inflater service inflater = (layoutInfleter) context.getSystemService (reference. LAOUT_INFLATER_SERVICE); ItemView = inflater.inflate (R.layout.photos_gallery_row, guardian, incorrect); Title = (TextView) itemView.findViewById (R.id.galleryTitle); ImageView imageView = (ImageView) itemView.findViewById (R.id.galleryImageView); // Set the image image loader. Displays (item.mureUrl XL, imageview); // Text title. Set up the sitemap; See Return Items; }
Any idea why displaying such bad resolution images?
The default functionality 2 image of the library seems to be scaled down Has the power of sampling. I think this is the source of your problem. For example:
DisplayImageOptions opts = new DisplayImageOptions.Builder ( ). ImageScaleType (ImageScaleType.NONE) .build (); ImageLoader.DisplayImage (item.imageUrlExtraLarge, imageView, opts);
Comments
Post a Comment