Reputation: 47901
I'm setting a larger image to a ImageView in Android using the Android Universal ImageLoader. However, I'm getting jagged or non-smooth edges when the image gets scaled down. Is there an option I can set in the imageview to have a smoother edges when scaling down of the image?
Upvotes: 0
Views: 1006
Reputation: 14818
You can try setting ImageScaleType to EXACTLY and you can also set Bitmap.Config to ARGB_8888 for better photos.
DisplayImageOption options = new DisplayImageOptions.Builder().showStubImage(R.drawable.ic_launcher).showImageForEmptyUri(
R.drawable.ic_launcher).showImageOnFail(R.drawable.ic_launcher).cacheInMemory()
.resetViewBeforeLoading().showStubImage(R.drawable.ic_launcher).imageScaleType(
ImageScaleType.EXACTLY).cacheOnDisc().bitmapConfig(Bitmap.Config.RGB_565).build();
Upvotes: 1