-
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
negative value of property transform doesn't work on some android 7.0 devices. #14462
Comments
Confirm at RN 0.43.2 Huawei OS7.0 P10. VTR-L09/VTR-L29 Doesn't work with transform, works with deprecated. |
This is a real case reported by various user by us as well. |
Looks like this could be a potential fix #14560 |
@janicduplessis add |
No, |
Summary: This is the better fix for the same issue as mentioned in PR #14560 Certain rotateX, rotateY, scaleX and scaleY animations do not work correctly on some phones in Android 7.0.0, causing issues such as #14462 and #13522. The issue can be fixed on JS side by setting an additional transform for perspective, eg. `{perspective: 1}` which triggers a `setCameraDistance` call in native code. The fix in this PR always sets the camera distance on transforms, even when no perspective transform was specified. The default camera distance is set before the scale multiplication, to make sure that the value is appropriate for the phones density. The value calculates to an Android 'default' camera distance of 1280 * scale multiplier; https://developer.android.com/reference/android/view/View.html#setCameraDistance(float) If a perspective transform is specified, this value will be used correctly still. This fix was tested on the RNTester. Before the fix, on some devices, the FlatList example, with inverted turned on, will not display the list. Devices that have been confirmed to have this issue: FRD-AL10(honor 8) EMUI:5.0 android: 7.0 MHA-AL00(Mate9) EMUI:5.0 android:7.0 Huawei P10 VTR-L09, running Android 7.0 After the fix, the inverted FlatList displays correctly. Closes #14646 Differential Revision: D5492009 Pulled By: shergin fbshipit-source-id: d4da3b090a7e65df3b84e48ea32c964f4f8f7c88
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
RN version: "0.41.2"
devices:
FRD-AL10(honor 8) EMUI:5.0 android: 7.0
MHA-AL00(Mate9) EMUI:5.0 android:7.0
On some android device mentioned before , negative value of transform(e.g.. scaleX scaleY ) doesn't work. i found this problem when i'm using the package of react-native-invertible-scroll-view. It write like this:
but when i use scaleY which is deprecated directly, like this:
it worked!
Guess there is some thing wrong when get property from transform in native code, Any ideas how does this fix?
The text was updated successfully, but these errors were encountered: