question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switch component not rendering correctly in Android 9.0. It's invisible!

See original GitHub issue

Environment

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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
snoyiatkcommented, Sep 25, 2019

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 switch-bug

1reaction
react-native-botcommented, Feb 20, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue rendering Switch in Android - Stack Overflow
I am trying to use Switch component of Android but while clicking on it, I am getting below view which is not desired,...
Read more >
Behavior changes: apps targeting API level 28+
Android 9 (API level 28) introduces a number of changes to the Android system. The following behavior changes apply exclusively to apps that ......
Read more >
Android 9 features and APIs
New RTT APIs support indoor positioning in your apps. Android 9 adds platform ... Developer options screen showing different cutout sizes.
Read more >
Android Studio 2022.1.1 Closed Issues
Android Studio Electric Eel Beta 1 (2022.1.1.11) ; Android Gradle Plugin. Issue #237303854. Component.sources does not give access to the "resources" files.
Read more >
Slow rendering - Android Developers
If you're seeing inflation during a frame (and not in a section labelled RV Prefetch), be sure you're testing on a recent device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found