0

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?

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

1 Answers1

1

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();
Sunny
  • 14,522
  • 15
  • 84
  • 129