All Projects → NoNews → Nopaginate

NoNews / Nopaginate

Licence: apache-2.0
Android pagination library (updated 01.05.2018)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Nopaginate

Android Pagination With Recyclerview
Pagination (Endless or Infinite Scrolling) using RecyclerView's onScrollListener
Stars: ✭ 269 (+49.44%)
Mutual labels:  recyclerview, pagination
InfiniteScroll
You can do a Endless scroll in ListView or RecyclerView with simple steps, with a listener for do request to your web service.
Stars: ✭ 28 (-84.44%)
Mutual labels:  pagination, recyclerview
RxPagination
Implement pagination in just few lines with RxPagination
Stars: ✭ 20 (-88.89%)
Mutual labels:  pagination, recyclerview
Elements
⚒ Modular components for RecyclerView development enforcing clean, reusable and testable code, with built-in support for paging and complex hierarchies of data.
Stars: ✭ 75 (-58.33%)
Mutual labels:  recyclerview, pagination
Rocksdb Sharp
.net bindings for the rocksdb by facebook
Stars: ✭ 173 (-3.89%)
Mutual labels:  wrapper
React Openlayers
OpenLayer React Components
Stars: ✭ 169 (-6.11%)
Mutual labels:  wrapper
Imageflow
A simple wrapper of TensorFlow for Converting, Importing (and Soon, Training) Images in tensorflow.
Stars: ✭ 166 (-7.78%)
Mutual labels:  wrapper
Spaces Api
An API wrapper for DigitalOcean's Spaces object storage designed for easy use.
Stars: ✭ 166 (-7.78%)
Mutual labels:  wrapper
Modernavplayer
ModernAVPlayer is a persistence AVPlayer wrapper
Stars: ✭ 179 (-0.56%)
Mutual labels:  wrapper
Tdl
Node.js bindings to TDLib.
Stars: ✭ 177 (-1.67%)
Mutual labels:  wrapper
Customadapter
RV Adapter 优雅封装,抽取列表模版,可以快速的添加一个列表,使用组装的方式构建Adapter,抽象Cell 角色,负责创建ViewHolder,绑定数据和逻辑处理。Cell为一个独立的组件。
Stars: ✭ 172 (-4.44%)
Mutual labels:  recyclerview
Config4k
A Kotlin wrapper for Typesafe Config
Stars: ✭ 168 (-6.67%)
Mutual labels:  wrapper
Airbnb Android Google Map View
This is a sample Android Application which has Google Map view similar to what AirBnb Android Application. Moving Markers like Uber/Ola. Custom Google Search for places. Recycler view with Animations added.
Stars: ✭ 175 (-2.78%)
Mutual labels:  recyclerview
Timeline
瀑布流式的时间轴
Stars: ✭ 2,028 (+1026.67%)
Mutual labels:  recyclerview
Snappyrecyclerview
An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
Stars: ✭ 178 (-1.11%)
Mutual labels:  recyclerview
Android Collectiondemo
集合了多个框架编译的demo,GreenDao数据库、网络访问、recyclerview、Lottie动画等
Stars: ✭ 166 (-7.78%)
Mutual labels:  recyclerview
Binding
Simple API implement DataBinding and ViewBinding. 简单的 API 实现 DataBinding 和 ViewBinding,欢迎 star
Stars: ✭ 169 (-6.11%)
Mutual labels:  recyclerview
Pagerfanta
Pagination library for PHP applications with support for several data providers
Stars: ✭ 175 (-2.78%)
Mutual labels:  pagination
Libuvsharp
.NET bindings for libuv
Stars: ✭ 170 (-5.56%)
Mutual labels:  wrapper
Fastadapter
快速使用的RecyclerView Adapter
Stars: ✭ 170 (-5.56%)
Mutual labels:  recyclerview

NoPaginate

Android Arsenal androidweekly.cn Download API

Android pagination library, based on @MarkoMilos repository Paginate

Loading Item Error Item

Gradle

implementation 'ru.alexbykov:nopaginate:0.9.9'

Install

  NoPaginate noPaginate = NoPaginate.with(recyclerView)
                .setOnLoadMoreListener(new OnLoadMoreListener() {
                    @Override
                    public void onLoadMore() {
                        //http or db request
                    }
                })
                .build();

If you use MVP or Clean Architecture, don't forget implement PaginateView. You can see example of implementation with MVP here

Actions

   noPaginate.showLoading(show);
   noPaginate.showError(show);
   noPaginate.setNoMoreItems(set); //Method onLoadMore will not to call
   noPaginate.unbind(); //Don't forget call it on onDestroy();

Custom Loading and Error

For custom error and loaging item just implement the interfaces ErrorItem or LoadingItem

Custom error:

public class CustomErrorItem implements ErrorItem {

           @Override
           public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
               View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_error, parent, false);
               return new RecyclerView.ViewHolder(view) {
               };
           }

           @Override
           public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, final OnRepeatListener repeatListener) {
               Button btnRepeat = (Button) holder.itemView.findViewById(R.id.btnRepeat);
               btnRepeat.setOnClickListener(new View.OnClickListener() {
                   @Override
                   public void onClick(View v) {
                       if (repeatListener != null) {
                           repeatListener.onClickRepeat(); //call onLoadMore
                       }
                   }
               });
           }
}

Custom loading:

public class CustomLoadingItem implements LoadingItem {
   
        @Override
        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_loading, parent, false);
            return new RecyclerView.ViewHolder(view) {
            };
        }
        @Override
        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
   
        }
   
}

Install with custom items and trigger threshold

  NoPaginate noPaginate = NoPaginate.with(recyclerView)
                .setOnLoadMoreListener(new OnLoadMoreListener() {
                    @Override
                    public void onLoadMore() {
                        //http or db request
                    }
                })
                .setLoadingTriggerThreshold(5) //0 by default
                .setCustomErrorItem(new CustomErrorItem())
                .setCustomLoadingItem(new CustomLoadingItem())
                .build();

Idea

This repository is a slightly modified version of Paginate library. Author: @MarkoMilos

We decided to modify it a little, so that developers could easily use it with MVP or Clean Architecture

Roadmap

  1. Double-sided pagination
  2. Delegate for Presenter or Interactor, with implementation Limit/Offset and Page pagination
  3. Unit tests
  4. Wiki

Contributing

If you find any bug, or you have suggestions, don't be shy to create issues or make a PRs in the develop branch. You can read contribution guidelines here

My other libraries:

  1. NoPermission — Simple Android permission library, consist of only one class
  2. NoRecyclerViewAdapter — Simple base adapter for recyclerView

License

Copyright 2017 Alex Bykov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].