Switch component not rendering correctly in Android 9.0. It's invisible!
See original GitHub issueEnvironment
React Native Environment Info: System: OS: macOS 10.14 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Memory: 78.09 MB / 16.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node Yarn: 1.12.3 - ~/.yarn/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 23, 27, 28 Build Tools: 28.0.2, 28.0.3 System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.5.0 => 16.5.0 react-native: 0.57.7 => 0.57.7 npmGlobalPackages: react-native-cli: 2.0.1
Description
The Switch
component is not displaying in Android 9.0 Pie on Pixel devices or emulators when it’s inside of a ScrollView
. It is there and you can interact with the component, but it’s invisible.
Reproducible Demo
It looks like Snack is running Android 8.1. It’s not showing the problem. Only with Android 9.0 will you would see the problem. https://snack.expo.io/rJnA0c8mN
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top GitHub Comments
It is happening with latest version of RN (0.60.5), if any ancestor view has opacity property < 1, Switch component will not be rendered. Sample with default react-init app
I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.
If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.