Giter VIP home page Giter VIP logo

swiperefreshlayout's Introduction

SwipeRefresh supports pull-down refresh and pull-up loading for a single View

SwipeNest scroll view (supports various common View recycleView scrollView listView and other mixed arrangements) Handling scrolling conflicts With pull-down refresh and pull-up loading

MultipleListAdapter Simple and fast implementation of ListView multiple types of display

MultipleRecycleAdapter Simple and fast implementation RecycleView multiple types of display

Add Gradle dependency:

dependencies {
      compile 'com.github.powyin:scroll:3.2.5'
      compile 'com.android.support:recyclerview-v7:24.0.0'
}

SwipeRefresh UI

Refresh (customizable) Launch load to get new data (customizable) Upload and load data are all available (customizable)
github github github

SwipeNest UI

Refresh (customizable) Smooth scrolling conflicts between various Views Custom refresh example
github github github

how to use SwipeRefresh

    <com.powyin.scroll.widget.SwipeRefresh>
        <!--ListView-->
        <android.support.v7.widget.RecyclerView/>
    </com.powyin.scroll.widget.SwipeRefresh>

how to use SwipeNest

    <com.powyin.scroll.widget.SwipeNest>
        <FrameLayout>
            <ImageView />
        </FrameLayout>
        <android.support.v7.widget.RecyclerView/>
        <ImageView />
    </com.powyin.scroll.widget.SwipeNest>

Set refresh listener and refresh result processing

ISwipe

    ISwipe.setOnRefreshListener(new SwipeRefresh.OnRefreshListener() {
        @Override
        public void onRefresh() {
            // Start pull-down refresh
        }

        @Override
        public void onLoading(boolen isLoadViewShow) {
            // Start loading more
        }
    });
    
    ISwipe.setFreshStatue(ISwip.RreshStatus.SUCCESS);             //Pulldown refresh complete
    ISwipe.setFreshStatue(ISwipe.RreshStatus.ERROR);              //Pulldown refresh failed

     

SwipeRefresh set refresh mode

ISwipe.setSwipeModel(SwipeControl.SwipeModel model)
(BOTH = SwipeModel.SWIPE_BOTH)                    Support for pull-down refresh and pull-up loading 
(ONLY_REFRESH == SwipeModel.SWIPE_ONLY_REFRESH))  Only pull-down refresh
(ONLY_REFRESH == SwipeModel.SWIPE_ONLY_LOADINN)   Only pull-up loading is supported 
(SWIPE_NONE == SwipeModel.SWIPE_NONE)           Not supported

MultipleRecycleAdapter&MultipleListAdapter&MultipleViewPageAdapter

PowViewHolder<T> This class abstracts the necessary conditions for getting ListAdapter.Item and Recycle.Adapter.Item and PagerAdapter.Item;
The generic type must be determined when using it;
AdapterDelegate<T> This interface defines the ListAdapter and RecycleView.Adatper and PagerAdapter public data operations;

       

swiperefreshlayout's People

Contributors

powyin avatar

Stargazers

Harun Wangereka avatar joe gichuru avatar

Watchers

James Cloos avatar joe gichuru 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.