gameboyVito / react-native-ultimate-listview

A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row.
https://www.npmjs.com/package/react-native-ultimate-listview
MIT License
540 stars 87 forks source link

How to reproduce the animation of the pull-down refresh? #61

Open dajohnny opened 5 years ago

dajohnny commented 5 years ago

I am very grateful to the author for providing such an excellent plug-in for us to develop. 我非常感謝楼主為我們提供如此優秀的插件。

I want to re-present the loading animation when I click the "Search" button. Just like the entire animation that I pulled down and refreshed. 我想在單擊刷新按鈕時重新顯示加載動畫,就像我拉下並刷新的整個動畫一樣。

Which event should I trigger to achieve the effect? Like this attachment photo. 我應該觸發那個事件而達到下面這張照片的效果?

image

I tried most of the methods and didn't implement them. 😢 我嘗試大部分的方法,都沒有實現。

Thanks your watch

TieMuZhen commented 5 years ago

同问

1uokun commented 4 years ago

你的关注点应该从这个库转移到RefreshControl组件上 Your FOCUS should shift from this library to the RefreshControl component

很遗憾,目前只能通过修改原生模块或者使用第三方插件实现 Unfortunately, this can only be achieved by modifying Native modules or using third-party plugins

iOS原生UI组件为RCTRefreshControl,Android原生UI组件为AndroidSwipeRefreshLayout,详情Libraries/Components/RefreshControl/RefreshControl.js iOS native UI component is RCTRefreshControl, Android native UI component is android.support.v4.widget.SwipeRefreshLayout. See the detain in RefreshControl.js

iOS我不太了解,android随手势自上而下的方法是setProgressViewOffset(false, start, end); I don’t know much about iOS. The top-down method of android with gestures is setProgressViewOffset (false, start, end); in java