Possible RN 0.61 Android view regressions
See original GitHub issueAfter upgrading from 0.60.5 to 0.61.1, I’m seeing some funky visual behaviors with Android which might be directly related to #26289, but I don’t know enough about them to say for sure. For example, look at the difference in the buttons from react-native-paper@2.16.0
in the first screenshot below. Another example is my swipe deck component based on Animated.View. In Android now the swipe cards which have solid white backgrounds are somehow merging visually (second screenshot below). That is to say, all text and icon elements of both the top card and the underlying card are visible simultaneously.
Note: all screenshots are from a Samsung Galaxy S7 Edge. These behaviors did NOT occur for me in the Android emulator.
React Native version: System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 19.70 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.10.3 - ~/.nvm/versions/node/v8.11.4/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0 Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 11.0/11A420a - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.1 => 0.61.1 npmGlobalPackages: react-native-cli: 2.0.1 react-native: 0.61.0
Steps To Reproduce
- Connect an Android device (Does it have to be a Samsung Galaxy S7 Edge? I don’t know)
react-native init oldbutton --version 0.60.6; cd oldbutton
yarn add react-native-vector-icons react-native-paper
- Edit App.js to add a button somewhere with this code:
import { Button } from 'react-native-paper';
<Button dark color="#aaaaff" mode="contained" onPress={() => {}}>Test Button</Button>
react-native run-android
and observe the button’s visual behavior before/while touchingcd ..; react-native init newbutton; cd newbutton
- Repeat steps 3-5
Describe what you expected to happen:
I expected the views not to change so significantly between versions. See the third screenshot below. I used a lighter color on the button so you can see that even unpressed, the button has changed visually (odd dark outline), but the difference is more significant while pressing.
Snack, code example, screenshot, or link to a repository:
Note: all screenshots are from a Samsung Galaxy S7 Edge. These behaviors did NOT occur for me in the Android emulator.
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (11 by maintainers)
Seems to be related to #26544
Just want to note that this issue isn’t entirely new to RN 0.61 - I don’t have a repro immediately on hand, but I’ve noticed in previous versions of RN that if an element has both
borderRadius
andbackgroundColor
, and is very, very large, thebackgroundColor
disappears.EDIT: here’s a repro (try it on Android, and it takes at least 11 or 12 clicks): https://snack.expo.io/HyHS1Tkur
The repro case above should have problems at least as far back as 0.56, if I remember right