Requesting progressive rendering
From the progressive rendering section in the docs:
Uri uri;
ImageRequest request = ImageRequestBuilder
.newBuilderWithSource(uri)
.setProgressiveRenderingEnabled(true)
.build();
PipelineDraweeController controller = Fresco.newControllerBuilder()
.setImageRequest(requests)
.setOldController(mSimpleDraweeView.getController())
.build();
mSimpleDraweeView.setController(controller);
It looks as if there is no Fresco.newControllerBuilder, only Fresco.newDraweeControllerBuilder(). And with that modification, the assignment to PipelineDraweeController gives an incompatible types error.
Just a note as this sample code might want to be tweaked for clarity. It seems to compile and work with a DraweeController type.
Yeah, there was a typo in the documentation. This has been fixed now.
The documentation does not appear to have been fixed. The code in the docs link is the same as stated above and the problem still exists.
@LarsLiden, the code in the link above is: http://frescolib.org/docs/progressive-jpegs.html and is not the same as stated above. Which code are you looking at?
Thanks for your response, Ian. newDraweeControllerBuilder seems to return a PipelineDraweeControllerBuilder object, not a DraweeController so the code below triggers a compile error. If instead you change the code so controller is of type PipelineDraweeControllerBuilder, then the setController call fails as it expects a DraweeController.
Does that make sense?
DraweeController controller = Fresco.newDraweeControllerBuilder() . setImageRequest(request) .setOldController(mSimpleDraweeView.getController ()) .build(); mSimpleDraweeView.setController(controller);
On Tue, Jun 16, 2015 at 2:40 PM, IanChilds [email protected] wrote:
@LarsLiden https://github.com/LarsLiden, the code in the link above is: http://frescolib.org/docs/progressive-jpegs.html and is not the same as stated above. Which code are you looking at?
— Reply to this email directly or view it on GitHub https://github.com/facebook/fresco/issues/25#issuecomment-112576630.
The build() method will return you a PipelineDraweeController from the PipelineDraweeControllerBuilder, which can be passed to the SimpleDraweeView.
Ah. Got it. Thanks and sorry for the confusion.
On Tue, Jun 16, 2015 at 2:59 PM, IanChilds [email protected] wrote:
The build() method will return you a PipelineDraweeController from the PipelineDraweeControllerBuilder, which can be passed to the SimpleDraweeView.
— Reply to this email directly or view it on GitHub https://github.com/facebook/fresco/issues/25#issuecomment-112580964.