RecyclerView-FlexibleDivider alternatives and similar packages
Based on the "Recyclerview Widget" category.
Alternatively, view RecyclerView-FlexibleDivider 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. -
android-advancedrecyclerview
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting) -
XRecyclerView
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView -
sticky-headers-recyclerview
[UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView -
SuperRecyclerView
Pumped up 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. -
RecyclerViewHeader
Super fast and easy way to create header for Android RecyclerView -
RecyclerViewEnhanced
Android Library to provide swipe, click and other functionality to RecyclerView -
header-decor
A couple of sticky header decorations for android's recycler view. -
SectionedRecyclerView
An adapter to create Android RecyclerViews with sections, providing headers and footers. -
LastAdapter
Don't write a RecyclerView adapter again. Not even a ViewHolder! -
RecyclerView-MultipleViewTypesAdapter
Android library defining adapter classes of RecyclerView to manage multiple view types -
Dividers
Dividers is a simple Android library to create easy separators for your RecyclerViews -
RecyclerViewSwipeDismiss
A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView. -
RecyclerItemDecoration
ItemDecoration for RecyclerView using LinearLayoutManager for Android -
DynamicRecyclerView
Set of plugable extenstions for Android RecyclerView -
PowerfulRecyclerViewAdapter
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc. -
NoPaginate
Android pagination library (updated 01.05.2018) -
CircularLayoutManager
Custom Layout Manager for Recycler View -
recyclerview-binder
Android library for RecyclerView to manage order of items and multiple view types. -
KidAdapter
kotlin dsl for kids to simplify RecyclerView.Adapter logic -
InfiniteRecyclerView
A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps -
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 -
RollerTrack
A navigational roller track companion for RecyclerView lists -
Infinite scroll functionality for recycler views
Infinite scroll functionality for recycler views
Appwrite - The open-source backend cloud platform
* 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 RecyclerView-FlexibleDivider or a related project?
README
RecyclerView-FlexibleDivider
Android library providing simple way to control divider items of RecyclerView
Release Note
Gradle
repositories {
jcenter()
}
dependencies {
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
}
Usage
The following is the simplest usage.
Drawing a divider drawable retrieved from android.R.attr.listDivider between each cell.
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(this).build());
ItemDecoration | Usage |
---|---|
HorizontalDividerItemDecoration | For layout manager having vertical orientation to draw horizontal divider |
VerticalDividerItemDecoration | For layout manager having horizontal orientation to draw vertical divider |
*Please note that you can only set one of above item decorations at a time.
If you want to set color, size and margin values, you can specify as the followings.
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
recyclerView.addItemDecoration(
new HorizontalDividerItemDecoration.Builder(this)
.color(Color.RED)
.sizeResId(R.dimen.divider)
.marginResId(R.dimen.leftmargin, R.dimen.rightmargin)
.build());
Instead of setting color and size, you can set paint object.
Paint paint = new Paint();
paint.setStrokeWidth(5);
paint.setColor(Color.BLUE);
paint.setAntiAlias(true);
paint.setPathEffect(new DashPathEffect(new float[]{25.0f, 25.0f}, 0));
recyclerView.addItemDecoration(
new HorizontalDividerItemDecoration.Builder(this).paint(paint).build());
Also 9patch drawable can be used for drawing divider.
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(this)
.drawable(R.drawable.sample)
.size(15)
.build());
If you want to customize divider depending on the position, implement the following interfaces.
List of provider
The following providers can be implemented and controllable for each divider drawn between cells.
Please refer to ComplexAdapter class in the sample for the usage of providers in detail.
ColorProvider Provide color for divider
PaintProvider Provide paint object for divider line to draw.
DrawableDivider Provide drawable object for divider line
SizeProvider Provide height for horizontal divider, width for vertical divider.
VisibilityProvider
Enables you to control the visibility of dividers.MarginProvider for horizontal divider (vertical list)
Enables you to specify left and right margin of divider.MarginProvider for vertical divider (horizontal list)
Enables you to specify top and bottom margin of divider.
For GridLayoutManager, the position parameter of above providers is group index of items. So, control your divider based on group index instead of the position of items.
Optional
Builder.showLastDivider
Draw divider line at the end of last item in RecyclerView. If you enable this, the range of position parameter of providers listed above is 0 to itemCount-1. Otherwise, the range is 0 to itemCount-2.Builder.positionInsideItem
Draw divider inside items.
If you want to follow material design guideline, enable this feature.
Note
- When neither of color, paint, drawable is set, default divider retrieved from android.R.attr.listDivider will be used.
- When you set Paint, you must use setColor and setStrokeWidth methods of paint class.
- If you want to use DashPathEffect, please note the following issue. https://code.google.com/p/android/issues/detail?id=29944
Looking for custom ItemDecoration to achieve equal column space for GridLayoutManager?
Check out https://gist.github.com/yqritc/ccca77dc42f2364777e1
License
Copyright 2016 yqritc
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 RecyclerView-FlexibleDivider README section above
are relevant to that project's source code only.