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

[Android] [Image] tintColor is broken #3657

Closed
cosmith opened this issue Oct 24, 2015 · 9 comments
Closed

[Android] [Image] tintColor is broken #3657

cosmith opened this issue Oct 24, 2015 · 9 comments
Labels
Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.

Comments

@cosmith
Copy link
Contributor

cosmith commented Oct 24, 2015

Setting tintColor on Android has no effect.

iOS:
screen shot 2015-10-24 at 4 50 58 pm

Android:
screen shot 2015-10-24 at 4 51 14 pm

Sample app: https://rnplay.org/apps/oA7vIg

@ide
Copy link
Contributor

ide commented Oct 24, 2015

Can you give it border radius of 1 or some small value?

cc @kmagiera This might be a known problem. Is it easy to fix?

@cosmith
Copy link
Contributor Author

cosmith commented Oct 27, 2015

It works with a border radius of 1, thanks for the workaround 👍

@isair
Copy link
Contributor

isair commented Nov 11, 2015

@ide I've found that if the Image component has resizeMode="contain", having borderRadius: 1 in style doesn't fix it. Haven't tested with other resizeMode values.

@LightningK0ala
Copy link

Seems that the fix also doesn't work if the Image component is wrapping any children component.

@ide
Copy link
Contributor

ide commented Nov 22, 2015

I bet this could end up being easy to fix because tintColor is already implemented -- it just doesn't activate in certain cases. If there's a performance reason (the tint color code path is slower) then we could apply the tint color only when tintColor is set. I'm going to mark this as Help Wanted.

@ide ide added the Help Wanted :octocat: Issues ideal for external contributors. label Nov 22, 2015
@msathis
Copy link

msathis commented Dec 4, 2015

This seems to be working in latest master. But shows wrong warning
Failed propType: Invariant Violation: Invalid props.style key tintColorsupplied toImage.

screen

@ahanriat
Copy link
Contributor

ahanriat commented Dec 7, 2015

Yes it looks like it doesn't have the correct style props like on iOS

@scruff311
Copy link

This an old thread, but I find it still does not work on Android sometimes. I've tried adding borderRadius: 1 and removing the resizeMode="contain" but still nothing.

Is it size dependent by chance? I have one component with larger (60x60) images where it works, but another component with smaller images (14x14) where it doesn't.

I'm using React Native 49.5.

@jpmazza
Copy link

jpmazza commented Feb 23, 2018

HI! I'm having the same issue here. Any updates?

I'm using ReactNative 0.51.0

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

13 participants