Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting progressive rendering #25

Closed
csabatini opened this issue Mar 28, 2015 · 6 comments
Closed

Requesting progressive rendering #25

csabatini opened this issue Mar 28, 2015 · 6 comments

Comments

@csabatini
Copy link

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.

@plamenko
Copy link
Contributor

Yeah, there was a typo in the documentation. This has been fixed now.

@LarsLiden
Copy link

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.

@IanChilds
Copy link
Contributor

@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?

@LarsLiden
Copy link

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 notifications@github.com 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
#25 (comment).

@IanChilds
Copy link
Contributor

The build() method will return you a PipelineDraweeController from the PipelineDraweeControllerBuilder, which can be passed to the SimpleDraweeView.

@LarsLiden
Copy link

Ah. Got it. Thanks and sorry for the confusion.

On Tue, Jun 16, 2015 at 2:59 PM, IanChilds notifications@github.com 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
#25 (comment).

dalinaum pushed a commit to dalinaum/fresco that referenced this issue Jun 27, 2015
Update 02-configure-image-pipeline.md
@ramonqlee ramonqlee mentioned this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants