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

Resolve issue #23816, updated with recent merges #23961

Closed
wants to merge 5 commits into from
Closed

Resolve issue #23816, updated with recent merges #23961

wants to merge 5 commits into from

Conversation

RyanElliott10
Copy link
Contributor

@RyanElliott10 RyanElliott10 commented Mar 15, 2019

Summary

This fixes #23816, which states that getSize() does not function correctly on Android. The original PR for this is now outdated as there have been merges into master that would create merge conflicts.

Changelog

[Android] [Fixed] - Added correct handling for getSize() to avoid warnings being thrown.import

Test Plan

import React, { Component } from 'react';
import { View, Image } from 'react-native';

export default () => {
    console.log(JSON.stringify(Image.getSize('test_image')))

    return <View />
}

Running this on an android device, with an image named test_image in Drawable, will correctly log the image's dimensions and will not throw a warning saying Failed to get size for image: test_image.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 15, 2019
@RyanElliott10
Copy link
Contributor Author

RyanElliott10 commented Mar 16, 2019

@facebook-github-bot Review?

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @RyanElliott10 in eec2495.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 18, 2019
@hwth
Copy link

hwth commented Mar 20, 2019

Is this issue fixed in 0.59.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Image.getSize doesn't work with images from hybrid app's resources
5 participants