Android 比SwipeRefreshLayout更漂亮和強大的下拉重新整理控制項:Android-MaterialRefreshLayout

來源:互聯網
上載者:User

標籤:match   lan   roi   out   effect   set   https   complete   ati   

這是一個下拉重新整理的控制項,它比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

Android 比SwipeRefreshLayout更漂亮和強大的下拉重新整理控制項:Android-MaterialRefreshLayout

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.