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

Experiment with alternate delayed size resolution #2292

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chris-horner
Copy link
Collaborator

Initially tried integrating with dispatcher but it got hectic. Ended up with essentially a more generic DeferredRequestCreator which I'm not sure I like.

@chris-horner chris-horner marked this pull request as draft April 13, 2022 11:30
@@ -433,6 +440,17 @@ class RequestCreator internal constructor(
return
}

if (sizeResolver != null) {
picasso.resolveSize(sizeResolver!!, target) { (width, height) ->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred size resolution for BitmapTarget

@@ -556,11 +574,18 @@ class RequestCreator internal constructor(
setPlaceholder(target, getPlaceholderDrawable())
}
picasso.defer(target, DeferredRequestCreator(this, target, callback))
picasso.resolveSize(ViewSizeResolver(target), target) { (width, height) ->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapting for existing fit()

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

Successfully merging this pull request may close these issues.

1 participant