ScrollView 在 android 中的 React-native-popover-view 中不起作用

问题描述 投票:0回答:1

将react-native升级到0.71.3版本后,作为子项传递给react-native-popover-view的ScrollView在android中不再可滚动,但在iOS中可用。在react-native版本升级之前是可以用的

` 从“反应”导入反应; 从“react-native-popover-view”导入 Popover;

function App() {
  return (
    <Popover
      from={(
        <TouchableOpacity>
          <Text>Press here to open popover!</Text>
        </TouchableOpacity>
      )}>
      <ScrollView contentContainerStyle={{ flexGrow: 1, paddingTop: 20 }}>
           {[...new Array(100)].map((item, index) => (
            <Text key={index}>{`${index}. Welcome to React native`}</Text>
           ))}
      </ScrollView>
    </Popover>
  );

} `

android react-native android-scrollview mobile-development react-native-scrollview
1个回答
0
投票

您尝试将 import { ScrollView } from 'react-native' 更改为 import { ScrollView } from 'react-native-gesture-handler';和我一起工作

© www.soinside.com 2019 - 2024. All rights reserved.