Giter Club home page Giter Club logo

dwrefreshlayout's Introduction

DWRefreshLayout

一个支持上拉和下拉,支持所有的View,支持自动刷新,支持自定义各种样式的刷新Layout.

上拉刷新 -----支持
下拉刷新 -----支持
自动刷新 -----支持
自定义刷新头 -----支持
自定义加载头 -----支持
刷新TextView -----支持
刷新ImageView -----支持
刷新ScrollView -----支持
刷新WebView -----支持
刷新LinearLayout -----支持
刷新FrameLayout -----支持
刷新ListView -----支持
无刷新头实现回弹效果 -----支持
其它View -----支持
其它ViewGroup -----支持
刷新头在内容之下 -----支持
刷新头在内容之上 -----支持
刷新头在内容之并排 -----支持
.... -----支持

Gradle compile dependency:

compile 'com.ufo:DWRefreshLayout:0.9.2'

DWRefreshLayout属性

 <declare-styleable name="DWRefreshLayout">
        <attr name="refresh_style">
            <enum name="style_below" value="1"/>
            <enum name="style_default" value="2"/>
            <enum name="style_material" value="3"/>
        </attr>

    </declare-styleable>

1 style_below:表示刷新头在布局的内容下面.

2 style_default:表示刷新头与内容是线性上下排列,默认就是这种样式.

3 style_material:表示刷新头在内容之上,也就是Material Design风格.

1最简单的使用示例:

 <com.ufo.dwrefresh.view.DWRefreshLayout
    android:id="@+id/dwRefreshLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <任何控件>

</com.ufo.dwrefresh.view.DWRefreshLayout>

.

    DWRefreshLayout dwRefreshLayout = (DWRefreshLayout) findViewById(R.id.dwRefreshLayout);
    dwRefreshLayout.setOnRefreshListener(new DWRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
           //刷新回调
        }

        @Override
        public void onLoadMore() {
            //加载更多回调
        }
    });

TextView

RecyclerView

Material Design

更多功能请参照Demo里的例子


扫我安装体验

dwrefreshlayout's People

Contributors

123ufo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.