fresco
fresco copied to clipboard
Use new ResizeOptions invalid
Uri sourceUri = Uri.parse("content://media/external/images/media/"
+ item.imageList.get(0).imageId);
GenericDraweeHierarchy genericDraweeHierarchy = new GenericDraweeHierarchyBuilder(
act.getResources())
.setPlaceholderImage(Drawables.sPlaceholderDrawable)
.setFailureImage(Drawables.sErrorDrawable)
// .setRoundingParams(RoundingParams.asCircle())
.setRoundingParams(RoundingParams.fromCornersRadius(10))
.setActualImageScaleType(ScaleType.CENTER_CROP)
// .setProgressBarImage(new ProgressBarDrawable())
.setPressedStateOverlay(Drawables.pressDrawable).build();
holder.iv.setHierarchy(genericDraweeHierarchy);
ImageRequest imageRequest = ImageRequestBuilder
.newBuilderWithSource(sourceUri)
.setResizeOptions(
new ResizeOptions(Device.getWidth() / 6, Device.getWidth()/6)).build();
DraweeController draweeController = Fresco
.newDraweeControllerBuilder().setImageRequest(imageRequest)
.setOldController(holder.iv.getController())
// .setControllerListener(simpleDraweeView.getListener())
.setAutoPlayAnimations(false).build();
holder.iv.setController(draweeController);
I load the local picture, no matter what size I am down to is invalid, but the display picture clarity
Document which said that only support scaling jpeg format, but I saw the picture on my phone is jpeg's, If the other mobile phone sent to me is that you can zoom in, if I can not beat myself up My phone is Samsung s4
Is your problem:
- the images do not load at all? or 2) the images do load, but are unclear?
I also do not recognize the Device class you are using. Try this instead:
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
... newResizeOptions(metrics.widthPixels / 6, metrics.widthPixels / 6)...
reaping