- Do not split decoration size in LinearMarginDecoration: #27
- Fixed decorations not being applied for items removed: #28
- BREAKING CHANGE: DecorationLookup now passes the current ViewHolder #29:
Before:
interface DecorationLookup {
fun shouldApplyDecoration(position: Int, itemCount: Int): Boolean
}
After:
interface DecorationLookup {
fun shouldApplyDecoration(viewHolder: RecyclerView.ViewHolder, itemCount: Int): Boolean
}
- Moved
setDecorationLookup
toAbstractMarginDecoration
- Added new
shouldApplyDecorationAt
toAbstractMarginDecoration
- Added support for
ConcatAdapter
.DecorationLookup
now receives the absolute adapter position.
Changed artifact to: com.rubensousa:decorator
- Fixed margins being applied incorrectly when
addBeforeFirstPosition
andaddAfterLastPosition
were set
- Added
MergeDecorationLookup
to combine multipleDecorationLookup
- Added
SingleItemDecorationLookup
to disable decorations when there's only a single item
- Added
addBeforeFirstPosition
andaddAfterLastPosition
parameter to control dividers at the first and last positions - Fixed
LinearDividerDecoration
reporting wrong positions in itsDecorationLookup
#14 - Fixed
LinearDividerDecoration
not applying dividers correctly at the last position #13
- Added
addBeforeFirstPosition
andaddAfterLastPosition
parameter to control margin at the first and last positions
- Fixed decorations not being applied correctly when the itemCount is 1
- Added
createVertical
andcreateHorizontal
helpers to:LinearMarginDecoration
LinearBoundsMarginDecoration
GridBoundsMarginDecoration
- Added
GridSpanBoundsMarginDecoration
to apply margins to the bounds of RecyclerViews that use a GridLayoutManager with different span sizes
- Initial release