All Projects → react-native-studio → React Native Mjrefresh

react-native-studio / React Native Mjrefresh

Licence: apache-2.0
基于ios MJRefresh https://github.com/CoderMJLee/MJRefresh 开发的插件,可提供自定义的弹性刷新

Projects that are alternatives of or similar to React Native Mjrefresh

React Native Smartrefreshlayout
基于android SmartRefreshLayout https://github.com/scwang90/SmartRefreshLayout 开发的插件,可提供类似ios的弹性刷新
Stars: ✭ 240 (+71.43%)
Mutual labels:  refresh, refreshlayout
Smoothrefreshlayout
一款支持上下拉刷新、越界回弹、二级刷新、横向刷新、拉伸回弹、平滑滚动、嵌套滚动的多功能刷新控件
Stars: ✭ 1,166 (+732.86%)
Mutual labels:  refresh, refreshlayout
goRefresh
让下拉刷新炫酷起来~轻松接入lottie动画,支持listview recyclerview scrollerview webview 。同时支持listview和recyclerview上拉加载
Stars: ✭ 24 (-82.86%)
Mutual labels:  refresh, refreshlayout
Shswiperefreshlayout
Android 升级版 SwipeRefreshLayout,支持RecyclerView、ScrollView等大部分组件,下拉刷新(Refresh)和上拉加载(Loadmore),支持自定义HeaderView和FooterView
Stars: ✭ 236 (+68.57%)
Mutual labels:  refresh, refreshlayout
Flutter refresh
flutter refresh 上拉刷新 下拉加载 进度条
Stars: ✭ 51 (-63.57%)
Mutual labels:  refresh, refreshlayout
ParticlesRefreshLayout-android
Particles Refresh Layout library for Android
Stars: ✭ 15 (-89.29%)
Mutual labels:  refresh, refreshlayout
Swiperefreshlayout
swipeRefreshLayout refresh pull-to-refresh
Stars: ✭ 26 (-81.43%)
Mutual labels:  refresh, refreshlayout
Spring Cloud Examples
Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等
Stars: ✭ 5,829 (+4063.57%)
Mutual labels:  refresh
Meibasemodule
A powerful multi-function library that extended base activity for Android!
Stars: ✭ 78 (-44.29%)
Mutual labels:  refreshlayout
Aosf
AOSF:全称为Android Open Source Framework,即Android优秀开源框架汇总。包含:网络请求okhttp,图片下载glide,数据库greenDAO,链式框架RxJava,组件路由ARouter,消息传递通信EventBus,热更新Tinker,插件化框架Replugin,文件下载FileDownloaer,图片选择PhotoPicker,图片滤镜/毛玻璃等特效处理,GIF图片展示控件,图片九宫格控件NineGridView,对话框Dialog,导航指示器ViewpagerIndicator,进度条ProgressWheel,下拉刷新SmartRefreshLayout,key-value高效数据存储MMKV等,应有尽有。
Stars: ✭ 601 (+329.29%)
Mutual labels:  refresh
Liquidrefreshlayout
Liquid Refresh Layout is a simple SwipeToRefresh library that helps you easily integrate SwipeToRefresh and performs simple clean liquid animation
Stars: ✭ 114 (-18.57%)
Mutual labels:  refreshlayout
Qrefreshlayout
下拉刷新,上拉加载更多,自动加载更多,用法同SwipeRefreshLayout,兼容所有view,兼容nested滚动,可以自定义header footer,支持下拉到二楼
Stars: ✭ 75 (-46.43%)
Mutual labels:  refreshlayout
Bgarefreshlayout Android
多种下拉刷新效果、上拉加载更多、可配置自定义头部广告位
Stars: ✭ 4,261 (+2943.57%)
Mutual labels:  refreshlayout
Refreshwithappbarlayout
类似知乎和BilibiliAndroid端个人中心界面 添加下拉刷新效果
Stars: ✭ 19 (-86.43%)
Mutual labels:  refresh
Glastoselenium
A bot for booking Glastonbury tickets using selenium
Stars: ✭ 89 (-36.43%)
Mutual labels:  refresh
Pullrefreshlayout
下拉刷新,上拉加载,真实的回弹(overscroll)效果(媲美qq),且大小只有37KB(是其他主流刷新库或回弹库的1/2,1/3,甚至是1/4),同时,自定义header和footer,可以实现任何你想的到的功能(例如:自动触发加载更多、二级刷新等)
Stars: ✭ 639 (+356.43%)
Mutual labels:  refreshlayout
Pull To Refresh
ESPullToRefresh is developed and maintained by Vincent Li. If you have any questions or issues in using ESPullToRefresh, welcome to issue. If you want to contribute to ESPullToRefresh, Please submit Pull Request, I will deal with it as soon as possible.
Stars: ✭ 1,591 (+1036.43%)
Mutual labels:  refresh
Smartrefreshlayout
🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。
Stars: ✭ 23,185 (+16460.71%)
Mutual labels:  refreshlayout
Arrowdrawable
纯Paint实现的一个射箭效果,可用作Loading动画。
Stars: ✭ 103 (-26.43%)
Mutual labels:  refresh
Collapsingrefresh
AppBarLayout+ViewPager+RecyclerView的刷新功能
Stars: ✭ 69 (-50.71%)
Mutual labels:  refresh

React Native MJRefreshnpm version

React-Native-MJRefresh可完成使用React Native对IOS进行自定义下拉刷新设置

onPulling参数为{nativeEvent:percent},结合lottie-react-native可以获得绝佳的下拉刷新效果

自定义详情可见Example:HuaWeiRefreshControl.js

ListView使用见:ListViewExample

FlatList使用见:FlatListExample

Android自定义下拉刷新组件见React-Native-SmartRefreshLayout

安装

第一步

工程目录下运行:

npm install --save react-native-mjrefresh (rn>=0.55.0)

npm install --save react-native-mjrefresh-lower (rn<=0.54)

or(已经安装了yarn)

 yarn add react-native-mjrefresh (rn>=0.55)

 yarn add react-native-mjrefresh-lower (rn<=0.54)

Notice

react-native react-native-mjrefresh
<0.55 使用react-native-mjrefresh-lower
>=0.55 *
>=0.58 0.7.0

第二步

使用link添加:

工程目录下运行:

react-native link react-native-mjrefresh (rn>=0.55)

react-native link react-native-mjrefresh-lower(rn<=0.54)

使用CocoaPods添加:

podfile添加:

  pod 'RCTMJRefreshHeader', :path => '../node_modules/react-native-mjrefresh'

执行:

  pod install

第三部使用

在工程中导入:

import MJRefresh,{ScrollView} from 'react-native-mjrefresh'//rn>=0.55
//import MJRefresh,{ScrollView} from 'react-native-mjrefresh-lower'//rn<=0.54

//该ScrollView兼容官方所有的属性和方法,refreshControl也可以使用官方的RefreshControl
  state={
        text:'下拉刷新'
    }
  render() {
    return (
        <ScrollView
            refreshControl={
              <MJRefresh
                  ref={ref=>this._mjrefresh = ref}
                  onRefresh={
                  ()=>{
                      this.setState({
                          text:'正在刷新'
                      })
                      console.log('onRefresh')
                      setTimeout(()=>{
                          this._mjrefresh && this._mjrefresh.finishRefresh();
                      },1000)
                  }
                  }
                  onRefreshIdle={()=>console.log('onRefreshIdle')}
                  onReleaseToRefresh={()=>{
                      this.setState({
                          text:'释放刷新'
                      })
                  }}
                  onPulling={e=>{
                      if(e.nativeEvent.percent<0.1){
                          this.setState({
                              text:'下拉刷新'
                          })
                      }
                  }}
              >
                <View style={{height:100,backgroundColor:'red',
                    justifyContent:'center',
                    alignItems:'center',flexDirection:'row'
                }}>
                  <Text>{this.state.text}</Text>
                </View>
              </MJRefresh>
            }
        >
          <View style={{flex:1,height:1000,backgroundColor:'#ddd'}}>
          </View>
        </ScrollView>
    );
  }

MJRefresh

查看属性

查看方法

文档

Props

onReleaseToRefresh

可释放刷新时触发

Type Required
function No

onRefresh

刷新时触发

Type Required
function No

onRefreshIdle

刷新闲置时触发

Type Required
function No

onPulling

   ({nativeEvent: {percent:number}})=>void;

header下拉过程中触发

Type Required
function No

Methods

beginRefresh

   beginRefresh();

开始刷新


finishRefresh

   finishRefresh();

结束刷新

示例

图片名称 图片名称
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].