zoukankan      html  css  js  c++  java
  • materialrefeshlayout下拉刷新,上拉加载更多

    1.添加依赖:compile 'com.cjj.materialrefeshlayout:library:1.3.0'


    2.布局中添加控件,包裹list控件
       <com.cjj.MaterialRefreshLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/refresh"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
       </com.cjj.MaterialRefreshLayout>

    3.初始化布局控件

    4.设置可上拉加更多:refresh.setLoadMore(true);

    5.设置监听回调:refresh.setMaterialRefreshListener(new MaterialRefreshListener() {
      a:下拉刷新
       public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {}
      b:上拉加载更多
       public void onRefreshLoadMore(MaterialRefreshLayout materialRefreshLayout) {}
  • 相关阅读:
    hdu 2295 DLX
    hdu 4714 树形DP
    hdu 4711 动态规划
    hdu 3656 DLX
    hust 1017 DLX
    hdu 3938 并查集
    hdu 3652 打表
    poj 2152 树形DP
    洛谷P1266速度限制
    洛谷P1841重要的城市
  • 原文地址:https://www.cnblogs.com/livelihood/p/6758777.html
Copyright © 2011-2022 走看看