I am using frescolib on my application to load images from url. However, I am experiencing a problem within the objects of the recyclerview. Specifically I need to center the images in SimpleDraweeView while keeping the format. So I'm using the following code, but I get the streaked, stretched images in the part that should be white.
My code:
RoundingParams roundingParams = RoundingParams.fromCornersRadius(50f);
GenericDraweeHierarchy hierarchy =
GenericDraweeHierarchyBuilder.newInstance(activity.getResources())
.setRoundingParams(roundingParams)
.setActualImageScaleType(ScalingUtils.ScaleType.CENTER_INSIDE)
.setFailureImage(ContextCompat.getDrawable(activity,R.drawable.ic_image_off))
.setProgressBarImage(ContextCompat.getDrawable(activity,R.drawable.animview))
.build();
this.imageView.setHierarchy(hierarchy);
this.imageView.setImageURI(uri);
Any idea why the image is loaded badly?