negative value of property transform doesn't work on some android 7.0 devices.
See original GitHub issueRN 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:
let styles = StyleSheet.create({
verticallyInverted: {
flex: 1,
transform: [
{ scaleY: -1 },
],
},
horizontallyInverted: {
flex: 1,
transform: [
{ scaleX: -1 },
],
},
});
but when i use scaleY which is deprecated directly, like this:
let styles = StyleSheet.create({
verticallyInverted: Platform.select({
ios: {transform: [{ scaleY: -1 }]},
android: {scaleY: -1},
}),
horizontallyInverted: Platform.select({
ios: {transform: [{ scaleX: -1 }]},
android: {scaleX: -1},
}),
});
it worked!
Guess there is some thing wrong when get property from transform in native code, Any ideas how does this fix?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Force correct CSS3 transform percentage interpretation on ...
I am using Android 2.3 and can't produce the exact problem you describe (with regards to your comment "-100% somehow refers to the...
Read more >Sensors Overview | Android Developers
Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions. These sensors are capable of ...
Read more >Android Studio 2021.2.1 Closed Issues
Android studio 2021.1.1 beta5 . Gradle sync fails with "Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.".
Read more >Android Studio 2022.1.1 Closed Issues
[R8 3.3.68] Crash on some Android 6 devices after upgrading from R8 3.2. Issue #258270051 ... Regression in EE: Extracting a method sometimes...
Read more >MotionEvent - Android Developers
The axis values describe the position and other movement properties. ... Some devices can report multiple movement traces at the same time.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.