[Android] skew transform not working
See original GitHub issueSteps To Reproduce
- Try to set
skewX
for View component:transforms: [{ skewX: '45deg' }}
- Doesn’t change the skew of View on Android (works on iOS)
Describe what you expected to happen:
Basically skewX
doesn’t apply any skew on the view on Android.
Here is comparison between iOS/Android:
also
skewY
doesn’t render same as on iOS (which looks more correct)
React Native version:
System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.50 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
Yarn: 1.19.1 - ~/.yarn/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 25, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Related issues
Snack demo
https://snack.expo.io/@usrbowe2/e9b920
Resources
In case anyone interested, here is the source code for skew code:
- This is called for SkewX:
MatrixMathHelper.applySkewX(helperMatrix, convertToRadians(transform, transformType));
in file:Libraries/StyleSheet/processTransform.js
- Which laters uses this matrix helper to apply transformation: https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:19
Top Results From Across the Web
Transform is not working for android but works for ios- rect ...
I am using react:16.0.0-beta.5 and react-native: 0.49.3, trying to rotate my graph on 180 degrees but when I pass transform in my style, ......
Read more >The 10-min React Native Skew & Tween Transforms - YouTube
In this video, we showcase the decompose2d and tween function from redash Source code: ...
Read more >skew() - CSS: Cascading Style Sheets - MDN Web Docs
The skew() CSS function defines a transformation that skews an element on the 2D plane. Its result is a <transform-function> data type.
Read more >[Android] skew transform not working -
[Android] skew transform not working. ... Try to set skewX for View component: transforms: [{ skewX: '45deg' }}; Doesn't change the skew of...
Read more >Transforms
However, once you apply transforms, the layouts remain the same around the transformed component hence it might overlap with the nearby ...
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
This is real problem!
still not wroking… any solution ?