android - FlatList Pull刷新在Android的Interactable.View中不起作用
问题描述
我在 Interactable (react-native-interactable) .View 中使用了 FlatList 和 Pull to Refresh 功能。我使用 Interactable.View 来集成拖动操作以打开导航菜单抽屉。
<View style={styles.container}>
<Menu
onItemSelected={this.onItemSelected}
navigation={this.props.navigation}
/>
<Interactable.View
style={styles.interactable}
ref={component => this.interactableView = component}
horizontalOnly={true}
animatedNativeDriver={true}
snapPoints={[{ x: 0, y: 0, damping: 0.8 }, { x: SideMenuWidth, y: 0, damping: 0.8 }]}
boundaries={{ left: 0, right: SideMenuWidth, top: 0 }}
initialPosition={{ x: 0, y: 0 }}
onSnap={this.onSnapInteractable}
startOnFront={true}
>
<Home
ref={component => this.home = component}
onToggleBurger={this.toggleMenu}
navigation={this.props.navigation} />
</Interactable.View>
<Loading isLoading={this.props.isLogining} />
</View>
在家:
<FlatList
style={{zIndex: 10}}
refreshing={this.state.isRefreshing}
onRefresh={this._refreshData}
initialNumToRender={5}
maxToRenderPerBatch={5}
data={this.state.sections}
getItem={(data, index) => data.get(index)}
getItemCount={(data) => data.size}
onEndReachedThreshold={0.5}
keyExtractor={this._getKeyExtractor}
renderItem={this._renderItem}
ListEmptyComponent={this._renderEmpty}
ListFooterComponent={footerView}
removeClippedSubviews={true}
/>
拉动刷新功能在 iOS 中运行良好,但在 Android 中它不起作用或难以拉动。
有什么建议可以解决这个问题吗?
解决方案
推荐阅读
- python - 执行导入语句字符串并使用导入
- python - 如何仅使用 python 标准库创建 excel 文件
- python - 子词标记预处理转换器的问题
- string - 将毫秒转换为持续时间到字符串?
- laravel - 如何在 Config/Constants.php 中调用 Laravel 辅助方法
- javascript - How to use a javascript function to generate a HTML table?
- flutter - FutureBuilder 等待结果后,CircularProgressIndicator Widget 会发生什么?
- algorithm - 如何使用位运算符找到 n 位整数的 log-base-2 的底?
- powershell - 是否可以使用 Rest api Powershell 脚本执行 Azure 测试计划
- c++ - std::unique_ptr 将已删除函数与 move 一起使用