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

Default image is rotating before actual image loads completely #190

Open
manjeets12 opened this issue Jul 27, 2019 · 0 comments
Open

Default image is rotating before actual image loads completely #190

manjeets12 opened this issue Jul 27, 2019 · 0 comments

Comments

@manjeets12
Copy link

manjeets12 commented Jul 27, 2019

"react-native": "^0.59.5"
"react-native-photo-view": "^1.5.2"

imageLoadError =()=>{
}
 <PhotoView
          loadingIndicatorSource={require(PATH_TO_LOCALE_IMAGE)}
          source={{ uri: IMAGE_URL }}
          minimumZoomScale={0.95}
          maximumZoomScale={4}
          scale={5}
          androidScaleType="fitCenter"
          // onLoad={() => console.log('Image loaded!')}
          onError={this.imageLoadError}
          style={styles.image}
        />

Everything looks fine in debug mode but in android release build default image keep rotating until actual image loads.

actually following code seems to be reason for that, It will be great if there is some options to disable that default rotation animation

    public void setLoadingIndicatorSource(@Nullable String name,
                                          ResourceDrawableIdHelper resourceDrawableIdHelper) {
        Drawable drawable = resourceDrawableIdHelper.getResourceDrawable(getContext(), name);
        mLoadingImageDrawable =
                drawable != null ? (Drawable) new AutoRotateDrawable(drawable, 1000) : null;
        mIsDirty = true;
    }
@manjeets12 manjeets12 changed the title Default image is rotating before actual loads Default image is rotating before actual image loads completely Jul 27, 2019
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

No branches or pull requests

1 participant