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

Vector Drawable support #16651

Closed
andrewfluck opened this issue Nov 2, 2017 · 6 comments
Closed

Vector Drawable support #16651

andrewfluck opened this issue Nov 2, 2017 · 6 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@andrewfluck
Copy link

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: Not Found
Xcode: Not Found
Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.5 => 0.49.5

Steps to Reproduce

  1. Put your vector drawable into the Android drawable folder.
  2. Inside the image primitive, call the resource using the uri method
  3. There is no vector drawable inside the view.

Expected Behavior

I expected the vector file to load fine and populate inside the Image

Actual Behavior

The vector drawable was not visible at all. I do not think it even loaded into there.

Reproducible Demo

  1. Initialize a React Native project
  2. Put a vector drawable in the drawable directory
  3. Create an Image, I did this for example: <Image source={{ uri: 'ic_arrow' }} style={{height: 24, width: 24}}/>
  4. Run the app, the vector doesn't load
@cdlewis
Copy link
Contributor

cdlewis commented Nov 4, 2017

Image doesn't support vector drawables so I think this is a feature request rather than a bug.

@andrewfluck
Copy link
Author

Oh? It doesn't even support it? I would assume it did. 😕

@cdlewis
Copy link
Contributor

cdlewis commented Nov 6, 2017

If you Google around there are some modules that add vector drawable support. Can't speak to their quality/reliability though.

@andrewfluck
Copy link
Author

That's the thing, I don't want something that could break easily, I trust primitives more than 3rd party implementations.

@andrewfluck
Copy link
Author

Another thing is with vector drawables, they work just like normal bitmap drawables that you can require in. If the image component is based on ImageView, then it should be able to have native vector drawable support too. I could be wrong though.

@stale
Copy link

stale bot commented Jan 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 13, 2018
@stale stale bot closed this as completed Jan 20, 2018
@facebook facebook locked and limited conversation to collaborators May 15, 2018
@Abbondanzo Abbondanzo linked a pull request Jul 10, 2024 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants