React Native嵌套水平ScrollView在Android上不起作用

时间:2019-03-08 16:06:49

标签: android react-native scrollview

我正在尝试使用具有一些分页内容(可左右滑动)的垂直滚动屏幕。

在分页内容中,放置了另一个带有部分的框,该框具有自己的水平分页,并且每个子页面上都有垂直滚动。

这在iOS上是开箱即用的,但是在android上,我无法在嵌套的分页滚动视图中水平滚动。但这是水平的子滚动视图。

我已尝试将nestedScrollEnabled的所有不同组合用于<ScrollView>的道具。包括将它们置于所有滚动视图上。

这已经在Expo和独立的React Native应用程序中进行了测试,包括开胃模拟器和小米Pocophone F1。行为相同,没有水平嵌套滚动。

代码在这里 https://snack.expo.io/@esbenvb/scrollview-tests

Android行为 https://vimeo.com/322265966

iOS行为 https://vimeo.com/322266040

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
      Memory: 331.47 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.12.0 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/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, 25, 26, 27, 28
        Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
        System Images: android-25 | Google Play Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5199772
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.58.6 => 0.58.6 

0 个答案:

没有答案