-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Animated.View doesn't respect zIndex #23836
Comments
Also, it should be noted, that in the tutorial, which is a video, when they added the reverse() to the array map that outputs all the components, the Animated.View was on top. In the view, they used an Iphone simulator though. Other searches I have done have shown other people having zIndex issues with Animated.View on Android while not on Iphones. |
Additional note. I changed the code so each view being output is an Animated View. It did not change anything. Still the on that is being animated is under the rest. So it doesn't have anything to do with the type of View, it has more to do with the fact that one has the PanResponder attached to it. |
zIndex on Android is known to have issues (or at least require different code to get the solution than ios) Details on zIndex stacking context: https://philipwalton.com/articles/what-no-one-told-you-about-z-index/ |
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 a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
elevation helped in my case. Component is rendered on top but there are still all kinds of weird things. When the Animated View is on top of something clickable, that something takes precedence. Also, anything that was ever below the Animated View can't be clicked anymore. A mess. |
This has come up as an issue on my library with the The Fab componentThe
The Problem1. Half Touchable 2. Full Touchable Further testing: 7. Success Takeways:
This is somewhat of a complicated example, but it is a real use case with examples where Android is not working correctly. If it would help I can recreate these tests with very stripped down components. Anyway I hope someone finds this useful in debugging their app. |
@codypearce Thanks for the in depth work. Same issues with our code base. All issues specific to android. |
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 a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
🐛 Bug Report
I am trying to follow a tutorial on building a simple stack swiping app similar to how apps like Tinder works. Basically you stack cards and you swipe the top most one to the left or right. Doing so shifts the deck up so the next card is the new top most card.
In our tutorial, this is done by using position absolute on a number of View components and an Animated View component. The order in which they are rendered is so the Animated.View is rendered last.
The problem is that, at least when I render it on my Android device, the Animated.View is always on the bottom. I have tried changing the zIndex of the Animated View, but it has no effect. No matter what I do, the Animated.View is always behind all the others.
To Reproduce
Generate an array of Views, the last of which is an Animated.View, and style them so they are all position: absolute. Render on an Android devices.
Expected Behavior
When rendered last, the Animated.View should be rendered on top of all the other Views. Also, when the zIndex is changed to a very high number, the Animated.View should be rendered on top of all other components.
Code Example
Full code can be found at https://github.com/haddow777/swipe
bascially, the code that generates the Views is this
Environment
Android version 8.0.0 on Samsung Galaxy Note 8
The text was updated successfully, but these errors were encountered: