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] Animated.Text nested inside of another Text doesn't animate #15934

Closed
steveccable opened this issue Sep 13, 2017 · 12 comments
Closed
Labels
API: Animated Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@steveccable
Copy link
Contributor

Is this a bug report?

Yes, this is a bug report.

Have you read the Contributing Guidelines?

I have read the contributing guidelines for this repo, and have opened issues before.

Environment

  1. react-native -v: 0.48.2
  2. node -v: v7.7.2
  3. npm -v: 5.0.3

Then, specify:

  • Target Platform: This bug only seems to be affecting Android

  • Development Operating System: Developing on macOS 10.12.6

  • Build tools: Not using any special build tools or specific SDK

Steps to Reproduce

  1. Create an Animated.Text that is nested within another Text node
  2. Trigger the animation (I am doing this via an onPress on the Animated.Text)

Expected Behavior

Expect that the text will animate, just as it does outside of a Text node (and as it does inside of a Text node on iOS).

Actual Behavior

The text does not animate. All other behavior of the onPress seems to work fine, and the exact same code with only the wrapping Text node removed animates correctly.

Reproducible Demo

https://snack.expo.io/ByK73zw9W

The demo has a comment describing how to see the bug go away, and flipping it over to the iOS simulator rather than android displays the expected behavior regardless of Text nesting.

@steveccable steveccable changed the title Animated.Text nested inside of another Text doesn't animate on Android [Android] Animated.Text nested inside of another Text doesn't animate Sep 14, 2017
@alexeymolchan
Copy link

alexeymolchan commented Sep 25, 2017

Same here, Animated.Text doesn't work when nested in Text on Android

@stale
Copy link

stale bot commented Nov 24, 2017

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 Nov 24, 2017
@steveccable
Copy link
Contributor Author

I have checked just now and this issue has not been fixed.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 27, 2017
@stale
Copy link

stale bot commented Jan 26, 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 26, 2018
@stale stale bot closed this as completed Feb 2, 2018
@sahrens
Copy link
Contributor

sahrens commented Feb 2, 2018

cc @janicduplessis?

@sahrens sahrens reopened this Feb 2, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 2, 2018
@janicduplessis
Copy link
Contributor

I think nested text ends up rendering to a single native view with attributed text so this isn't supported. The best we could do is warn about it I think.

@react-native-bot react-native-bot added Android Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. API: Animated labels Mar 18, 2018
@stale
Copy link

stale bot commented Jun 17, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. 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 Jun 17, 2018
@steveccable
Copy link
Contributor Author

The issue is still present in my project (using RN 0.55.2 at time of writing this comment).

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 18, 2018
@stale
Copy link

stale bot commented Sep 16, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. 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 Sep 16, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 21, 2018
@stale
Copy link

stale bot commented Dec 21, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. 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 Dec 21, 2018
@steveccable
Copy link
Contributor Author

We upgraded our project to using RN v0.57.8 yesterday and are still seeing this problem occur in our app on Android.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 21, 2018
@janicduplessis
Copy link
Contributor

I don't think this will be fixed any time soon, this is a constraint of the current implementation, nested text renders as a single native text component that displays rich text using attributed strings. You'll have to find a way to avoid using nested text to be able to use animations with it.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 21, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Animated Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants