Cannot scroll smoothly on a page with a lot images (Android 9.0 only, fine for 8.x, 7.x)
See original GitHub issueEnvironment
Run react-native info
in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz
Memory: 223.26 MB / 16.00 GB
Shell: 4.4.23 - /usr/local/bin/bash
Binaries:
Node: 11.5.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.npm-packages/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: 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know. A simple page that has a ScrollView with 100 Image in it cannot scroll smoothly on emulator or device with Android 9.0 . It can scroll smoothly on Android 8.x or 7.x
Reproducible Demo
Reproduce project https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/tree/master
You should also be able to reproduce using the following simple steps:
react-native init AwesomeProject
- Edit App.js .
- Change View to ScrollView
- Add 100 different images under the ScrollView for example https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/blob/master/App.js
- Open an Android emulator with Android 9.0 (Pie) installed
react-native run-android
=== New information 2019-01-09 === FlatList does not work either. Here is the same project above changing ScrollView to FlatList https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/tree/flatlist
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:66 (7 by maintainers)
If it helps, I encountered the same problem with Flatlist and when setting removeClippedSubviews to true the scrolling becomes smooth.
Same problem I fixed by adding
resizeMethod={"resize"}
props to image