React-native: [Android] Image loading events & styles

Created on 10 Dec 2015  路  4Comments  路  Source: facebook/react-native

Hey

I've found that the onLoad, onLoadEnd and onLoadStart events aren't fired on the image in android. I'm guessing the docs need updating on this.

Also I've found that on Android the resizeMode style gets passed to the children of an image resulting in a warning... e.g.

<Image style={{resizeMode:'cover'}}>
   <Text>Loading</Text>
</Image>
Locked

Most helpful comment

onLoad not firing on 0.43 & 0.44

All 4 comments

Hey Thomas101, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If this is a feature request or a bug that you would like to be fixed by the team, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • We welcome clear issues and PRs that are ready for in-depth discussion; thank you for your contributions!

For what it's worth, these are actually properly labeled with the @platform: ios tag in the source code, but it seems that the documentation has not been re-generated since those labels were added.

So, a re-generation of the documentation should fix this.

@Thomas101 - onLoadStart, onLoad and onLoadEnd all fire on Android for network images, see: https://github.com/facebook/react-native/blob/master/Examples/UIExplorer/ImageExample.js#L51-L53

Created #5085 for the resizeMode issue! Thanks :)

onLoad not firing on 0.43 & 0.44

Was this page helpful?
0 / 5 - 0 ratings