I used spinner while image is loading by using onLoadEnd() method.
It worked on iOS.
But it doesn't work on Android.
{isLoadedImage === false ? (
<Spinner color={Colors.brandPrimary} style={Styles.spinner} />
) : null}
<FastImage
style={isLoadedImage ? Styles.thumb : [Styles.thumb, Styles.hidden]}
source={{
uri: photoUrl,
priority: FastImage.priority.high,
}}
onLoadEnd={() => this.setState({ isLoadedImage: true })}
/>
So I tried to use other methods : onLoadStart(), onProgress(), onLoad().
I found that only onLoadStart() method works.
i'm having the same problem. i think this happens if you set the width/height of the FastImage to 0.
@wuifdesign Yep - I can confirm that if I set width/height to 0, the onLoad callback is never fired
将其修复为#446
Using this component in Android will find performance issues with fps reduction. Have you ever encountered it?
Most helpful comment
i'm having the same problem. i think this happens if you set the width/height of the FastImage to 0.