Description
A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps. This library offers you a custom adapter to use with any recycler view. You get a callback when the user is about to reach the bottom (or top, depending on your configuration), of the list, which you can use to load more data. You can also customize what the loading view at the bottom of the list looks like.
InfiniteRecyclerView alternatives and similar packages
Based on the "Recyclerview Widget" category.
Alternatively, view InfiniteRecyclerView alternatives based on common mentions on social networks and blogs.
-
recyclerview-animators
An Android Animation library which easily add itemanimator to RecyclerView items. -
UltimateRecyclerView
A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features. -
XRecyclerView
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView -
android-advancedrecyclerview
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting) -
sticky-headers-recyclerview
DISCONTINUED. [UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView -
RecyclerView-FlexibleDivider
Android library providing simple way to control divider items (ItemDecoration) of RecyclerView -
ScrollablePanel
A flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView. It different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location. -
RecyclerViewEnhanced
Android Library to provide swipe, click and other functionality to RecyclerView -
SectionedRecyclerView
DISCONTINUED. An adapter to create Android RecyclerViews with sections, providing headers and footers. -
Dividers
DISCONTINUED. Dividers is a simple Android library to create easy separators for your RecyclerViews -
RecyclerView-MultipleViewTypesAdapter
Android library defining adapter classes of RecyclerView to manage multiple view types -
RecyclerViewSwipeDismiss
A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView. -
PowerfulRecyclerViewAdapter
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc. -
recyclerview-binder
Android library for RecyclerView to manage order of items and multiple view types. -
VsRecyclerView
The library that removes all boilerplate code allowing you to display lists with few lines of code. -
android RecyclerView support Header Footer and Empty list
android RecyclerView support Header Footer and Empty list
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of InfiniteRecyclerView or a related project?
README
Infinite Recycler View
A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps. This library offers you a custom adapter to use with any recycler view. You get a callback when the user is about to reach the bottom (or top, depending on your configuration), of the list, which you can use to load more data.
You can also customize what the loading view at the bottom of the list looks like.
Note: This library should be able to work with any layout manager, but has only been tested with LinearLayoutManager
Demo
This is the sample app in action:
Usage
Add a dependency to your build.gradle
:
dependencies {
compile 'com.iamtheib.infiniterecyclerview:library:1.4'
}
You can use any variation of RecyclerView in your layout, just make sure your adapter extends:
com.iamtheib.infiniterecyclerview.InfiniteAdapter
InfiniteAdapter is an abstract class, hence classes extending from it need to implement the following methods:
getLoadingViewHolder(ViewGroup parent)
: Returns the loading view to be shown at the bottom of the listgetCount()
: The count of the number of items in the list. This does not include the loading itemgetViewType(int position)
: Return the view type of the item atposition
for the purposes of view recycling. 0 index is reserved for the loading view. So this function cannot return 0onCreateView(ViewGroup parent, int viewType)
: Called when RecyclerView needs a new ViewHolder of the given type to represent an item. This is the same as the onCreateViewHolder method in RecyclerView.Adapter, except that it internally detects and handles the creation on the loading footeronBindViewHolder(RecyclerView.ViewHolder holder, int position)
: Subclasses should override this method, to actually bind the view data, but always callsuper.onBindViewHolder(holder, position)
to enable the adapter to calculate whether the load more callback should be invoked- Optional
getVisibleThreshold()
: Returns the number of scrollable items that should be left (threshold) in the list beforeOnLoadMoreListener
will be called. You can override this to return a preferred threshold, or leave it to use the default
API For InfiniteAdapter
setOnLoadMoreListener
: Registers a callback to be notified when there is a need to load more datamoreDataLoaded(int, int)
: This informs the adapter that data has been loaded. This also callsnotifyItemRangeInserted(int, int)
method, so the implementing class only needs to call this methodsetShouldLoadMore(boolean)
: Set as false when you don't want the recycler view to load more data. This will also remove the loading viewsetIsReversedScrolling(boolean)
: Set as true if you want the endless scrolling to be as the user scrolls to the top of the list, instead of bottom. You probably want to calllayoutManager.setStackFromEnd(true)
License
The MIT License (MIT)
Copyright (c) 2017 Ibrahim Sikiru
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original License
Copyright 2016 Saurabh Arora
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 all licence references and agreements mentioned in the InfiniteRecyclerView README section above
are relevant to that project's source code only.