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

Inconsistent Perspective between iOS and Android #22280

Closed
3 tasks done
wcandillon opened this issue Nov 14, 2018 · 6 comments
Closed
3 tasks done

Inconsistent Perspective between iOS and Android #22280

wcandillon opened this issue Nov 14, 2018 · 6 comments
Labels
API: Animated Bug Platform: Android Android applications. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@wcandillon
Copy link
Contributor

wcandillon commented Nov 14, 2018

Environment

[skip envinfo]
App created with create-react-native-app running on both iOS and Android.

Description

On Android, there is a default perspective transformation applied to the view. That leads to inconsistent transformations between Android and iOS. By reading the issues on Github, it looks like this default perspective is needed in order for some 2d transformation to work properly on some Android devices. I posted a question about this on stackoverflow: https://stackoverflow.com/questions/53300779/what-is-the-default-react-native-perspective-on-android

Unfortunately, I cannot find the inverse perspective transformation on Android that would lead me to build consistent 3d transformation between iOS and Android.
One suggestion I have (if my understanding of the problem is correct) is that if the transform set on the JS side has a perspective element, don't apply any another transform perspective on Android.

Reproducible Demo

https://snack.expo.io/@wcandillon/test-3d-transform
In the snack above, the animation is 2d as expected on iOS and 3d on Android (not expected).

@react-native-bot react-native-bot added Platform: Android Android applications. Platform: iOS iOS applications. labels Nov 14, 2018
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@wcandillon
Copy link
Contributor Author

@hramos Why do you think that this isn't a bug report? Many 3d transforms are affected by this issue. I would love to help out, I would need someone to point me in the right direction.

@hramos
Copy link
Contributor

hramos commented Feb 13, 2019

@wcandillon we recently started using the "Type: Bug Report" label in place of "Bug Report". Notice I only removed the old label.

@wcandillon
Copy link
Contributor Author

wcandillon commented Mar 27, 2019

Maybe as an alternative, I would be very interested to know which transform on Android cancel the default perspective value set on Android?

On https://github.com/wcandillon/can-it-be-done-in-react-native, I've build a couple of 3d transforms that require to know/set the exact perspective in order for the transform to be pixel perfect.

@stale
Copy link

stale bot commented Aug 2, 2019

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

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.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Animated Bug Platform: Android Android applications. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants