zoukankan      html  css  js  c++  java
  • Android 比SwipeRefreshLayout更漂亮和强大的下拉刷新控件:Android-MaterialRefreshLayout

    这是一个下拉刷新的控件,它比SwipeRefreshLayout更加漂亮和强大。它易于使用并且支持API LEVEL >= 8。希望你能够喜欢。

    Now let me talk about MaterialRefreshLayout of function

    (1)It can be done like SwipeRefreshLayout drop-down refresh effect,this is a kind of intrusive drop-down refresh.

    (2)However, there are some people who are not as like invasive drop-down refresh, so, it also has a non-invasive drop-down refresh function.

    (3)If you feel too drab, we can add a background of the wave shape.

    (4)If you want to make waveform covering on content, it can be done.

    (5)if you like the most simple effect,You can see the image below.

    (6)There are a lot of functions, you can see the source code...

    Usage

    Add dependency.

    dependencies {
        compile 'com.cjj.materialrefeshlayout:Library:1.0.0'
    }

    Use it in your layout xml.

    <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"
        >
          <...ListView or GridView or RecyclerView or ScrollView and more...>
    
    </com.cjj.MaterialRefreshLayout>

    Get instance and use it.

     materialRefreshLayout = (MaterialRefreshLayout) findViewById(R.id...);
     materialRefreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {
          @Override
          public void onRefresh(final MaterialRefreshLayout materialRefreshLayout) {
              //refreshing...
          }
      }
    // refresh complete 
    materialRefreshLayout.finishRefresh();

    项目主页:http://www.open-open.com/lib/view/home/1442240411977

  • 相关阅读:
    js的break与continue
    mongodb报错UserNotFound: Could not find user xxx@xxx
    2.mongodb基本命令
    centos导入mongodb数据库
    linux全局安装express
    centos查看软件及配置软件环境变量
    centos查看版本号
    Spring-boot+Mybatis+Maven+MySql搭建实例
    Spring Boot 静态资源处理
    使用Spring Boot开发WEB页面
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/8194175.html
Copyright © 2011-2022 走看看