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

Methods don't work on Android #391

Open
talentedev opened this issue Jan 9, 2019 · 4 comments
Open

Methods don't work on Android #391

talentedev opened this issue Jan 9, 2019 · 4 comments

Comments

@talentedev
Copy link

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.

@wuifdesign
Copy link

wuifdesign commented Jan 25, 2019

i'm having the same problem. i think this happens if you set the width/height of the FastImage to 0.

@tnortman
Copy link

@wuifdesign Yep - I can confirm that if I set width/height to 0, the onLoad callback is never fired

@cctanfujun
Copy link

fixed it in #446

@afeichuanqi
Copy link

将其修复为#446

Using this component in Android will find performance issues with fps reduction. Have you ever encountered it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants