临文乍了了,彻卷兀若无。这篇文章主要讲述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...
UsageAdd 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();
【Android 比SwipeRefreshLayout更漂亮和强大的下拉刷新控件(Android-MaterialRefreshLayout)】项目主页:http://www.open-open.com/lib/view/home/1442240411977
推荐阅读
- Android ToolBar使用
- Android开发之漫漫长途 IX——彻底掌握Binder
- android dialog
- 洋葱头一键装机如何运用,本文教您运用洋葱头一
- 一键还原系统,本文教您如何运用一键还原软件还
- 安装系统 黑云一键重装系统,本文教您如何迅速安装系统
- 电脑装系统图文详细教程,本文教您华为笔记本怎样装win
- 安装系统 笔记本怎样光盘重装系统,本文教您联想笔记本怎
- 一键安装win7,本文教您小马一键重装win7的办法