-
Notifications
You must be signed in to change notification settings - Fork 25k
[Image] Add onLoadX support on Android #3791
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
Conversation
|
Cool! I'll pass this to Tyrone who works on Fresco to take a look. |
|
Should we make it consistent with iOS which has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you plan to actually pass some data here? Otherwise it would be more efficient to send null instead of creating empty map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like on iOS we just pass null, so unless someone can think of a good reason to do otherwise I'll change it to null here as well
|
@brentvatne updated the pull request. |
4 similar comments
|
@brentvatne updated the pull request. |
|
@brentvatne updated the pull request. |
|
@brentvatne updated the pull request. |
|
@brentvatne updated the pull request. |
|
@mkonicek @tyronen @kmagiera - thanks for the great tips! I've factored them in and updated this PR. I also added an example to UIExplorer. I don't write a lot of Java so let me know if I did something weird and what you would suggest I do instead, please! At the moment it supports: |
|
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mentioned onError isn't working on android, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct -- this line is actually removing the platform annotation for onLoad
|
Getting there - few more comments |
|
Thanks for working on this! |
|
@kmagiera - just on vacation atm so not as much time but I will try to get to this over the next few days :) thanks for the review! |
|
Looks great. Just a few more things outlined above. Thanks for your patience |
|
@brentvatne updated the pull request. |
|
@brentvatne updated the pull request. |
|
Great job, this PR deserves some cool gif @facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/550311681783433/int_phab to review. |
|
Failed to land due to a Flow error. You can also see a repro for that on Travis. I asked the Flow guys about the correct way to fix this. |
|
@brentvatne updated the pull request. |
|
@facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/550311681783433/int_phab to review. |
|
Finally landed 🎉 The Android PRs often require changes to Buck files in order for them to build internally. This makes merging them quite a bit of work :( Some ideas how to fix this:
|
Summary: ~~This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.~~ Looks ready for review now. Closes facebook#3791 Reviewed By: svcscm Differential Revision: D2672262 Pulled By: mkonicek fb-gh-sync-id: 1e8f1cc6658fb719a68f7da455f30a7c9b1db730
Summary: ~~This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.~~ Looks ready for review now. Closes facebook#3791 Reviewed By: svcscm Differential Revision: D2672262 Pulled By: mkonicek fb-gh-sync-id: 1e8f1cc6658fb719a68f7da455f30a7c9b1db730
| } | ||
|
|
||
| @Override | ||
| public void onFailure(String id, Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are saying that fresco doesn't support ON_ERROR but you have onFailure here. Is the comment not correct? Any reason why you don't throw ON_ERROR here?

This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.Looks ready for review now.