-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Style property 'backgroundColor' is not supported by native animated module #14178
Comments
I just hit this problem myself while using it on a |
This is an error in the documentation, backgroundColor is not supported at the moment. |
@janicduplessis Is there a way to use the JS driver, i.e. by passing
But I still get an error:
This is with react-native 0.45.1 |
@chrisknepper Native and non-native drivers are not compatible so you need to use either one per animated value. If you get this error it is probably because you use useNativeDriver on another animation for the same animated value. |
Is there any roadmap when style properties like Especially for things like animating the navigation header when transitioning from one to another screen this would be awesome! 👍 |
It's not on the roadmap at the moment, backgroundColor should not be that bad to implement but layout properties like height is a lot harder. You can usually get around those limitations by using opacity with multiple stacked views and LayoutAnimation. |
Thanks for the quick reply! Actually never thought about using opacity for the backgroundColor, thanks! 👍 |
LayoutAnimation doesn't use animated values so it should not be an issue, LayoutAnimation is a lot less flexible but it makes some animations that are hard to do with Animated pretty easy. |
Thanks, I'll have a look into that :) |
@janicduplessis Any news on this? |
Does LayoutAnimation use the ui thread like the animated driver? Also, which properties are supported by LayoutAnimation? Blog post says layout and position, but what about borderRadius, border, and margin? |
I was able to confirm that borderRadius and margin are also animated, but padding is not. Native driver is used yes. |
Description
I am trying to animate
backgroundColor
with scrollView, but gotStyle property 'backgroundColor' is not supported by native animated module
But accoding to the blog post it has be supported.
Please help me to figure out how to animate backgroundColor with
useNativeDriver
or is it still not support (the blog post is wrong)?Reproduction Steps and Sample Code
Some code like:
Solution
None
I were trying to simple add 'backgroundColor: true' to
react-native/Libraries/Animated/src/NativeAnimatedHelper.js
Line 108 in dd5ac84
but not working.
Additional Information
The text was updated successfully, but these errors were encountered: