v2.10.0
In this release:
-
Update dependency on RecyclerView to 1.2.1 (and change usage of
adapterPositiontobindingAdapterPosition). -
Make sure that
ExpandableGroupconstructor is type-safe.
v2.9.0
In this release:
-
Add
GroupieAdapteras a default adapter which binds theGroupieViewHolderas its generic type, removing the need for creating a typealias for it yourself. (thanks @ibado) -
Add
replaceAll()method toGroupAdapter,SectionandExpandableGroup, which allows one to replace items without animations usingnotifyDataSetChanged()under the hood (thus differing fromupdate()which runsDiffUtiland therefore issues animations).
(NOTE: this change required adding a new method to GroupDataObservable public interface, which typically delegates onDataSetInvalidated() and in the end resolves to notifyDataSetChanged(). Theoretically there is no need to use this interface manually, but those who do depend on it will need to update accordingly.)
-
Undeprecate
groupie-databinding. While databinding is not preferred to viewbinding, those who use it should not need to callinitializeViewBindingmanually. -
Deprecate
groupie-kotlin-android-extensionsdue to its dependency onkotlin-android-extensions, which is also deprecated since Kotlin 1.4.20. -
Update Kotlin to 1.4.21.
v2.8.1
In this release:
- Add
getGroupsfunction toSection - Add draggable item example to main example project
- Fix javadoc of groupie-viewbinding's BindableItem.bind methods to refer to
ViewBindinginstead ofViewDataBinding(#334) - Making Kotlin extensions work with all classes extending GroupieViewHolder. (#350)
- Fix the crash when dragging an item to the top/bottom of the list area in main example (#351 )
- Various version updates and unit test maintenance
❤️ Thank you to the contributors of this release: @rayworks , @herbeth1u , @nashcft & @zsoltvilagos
v2.8.0
This release adds groupie-viewbinding support. With the addition of this, groupie-databinding has been deprecated. If you're using the databinding library, please consider updating your AGP to 3.6.0+ and switching to groupie-viewbinding. (Issue #322, PR #325 )
❤ Thank you to @nashcft & @massanchik for contributing to this release.
v2.7.2
In this release:
- Add fast simple first insert for
GroupAdapter.updateAsyncsimilar to howandroidx.recyclerview.widget.ListAdapterbehaves. (Issue #311, PR #313 ) - Fix outdated ExpandableContentItem name in documentation (PR #306)
- Add
@NonNullannotations to payloads argument ofBindableItem.bindmethod (PR #307) - Add
@NonNullannotations toItem.isSameAsandItem.hasSameContentAsmethods (PR #312) - Update library RecyclerView dependency to 1.1.0
❤ Thank you to @angusholder & @satoshun for contributing to this release.
v2.7.1
This release addresses the breaking changes in 2.7.0 in a less breaking manner as per discussion in #299 (PR #303 ). All old methods that were removed or changed have been returned but marked as deprecated and point to the ones that should be used instead.
Important if you've already updated to 2.7.0: If you now update to 2.7.1 be warned that getGroup(position) now functions like it did before 2.7.0. If you now want to get a top level group use the method getTopLevelGroup(position)
Other additions to this release:
- Fix urls in Maven POM (PR #302 )
- Added example for how to reorder expandable groups (PR #300)
❤️ Thank you to @ikesyo, @scottschmitz and @amitav13 for contributing to this release
v2.7.0
Edit: PLEASE USE 2.7.1 AS IT INTRODUCES THE BREAKING CHANGES IN A LESS BREAKING WAY
- Added
onViewAttachedToWindowandonViewDetachedFromWindowcallbacks toItem(PR #297) -
BREAKING CHANGES to
GroupAdapter- Some method names have been renamed and the functionality of existing ones has changed in order to provide more clarity to the API (PR #296, addresses issue #295):- original
getGroup(position)has been replaced withgetGroupAtAdapterPosition(position).getGroup(position)will now return a top level GroupAdapter group -
removeGroup(index)has been renamed toremoveGroupAtAdapterPosition(position)to reflect what it was actually doing. -
getItemCount(groupIndex)has been renamed togetItemCountForGroup(groupIndex). It still returns the number of items contained in a top level GroupAdapter group.
- original
All these methods + some pre-existing ones should now have proper Javadoc.
❤ Thanks to @AllanHasegawa for contributing to this release.
v2.6.0
-
BREAKING CHANGE
ViewHolderhas been renamed toGroupieViewHolderafter discussion #287 (PR #293) - Added
Item.hasSameContentAsmethod to be used when comparing content equality in the context ofDiffUtil. It's advised you use this instead of overridingItem.equals. The default implementation will callitem.equalsso existing code shouldn't break. (Issue #288, PR #292)
v2.5.1
This release fixes issue #235 - Kotlin Synthetic caching. Now calling synthetic properties on the Groupie ViewHolder will correctly use _findCachedViewById rather than doing findViewById. There should be a decent performance boost if you use synthetic properties 🚀.
Other small tweaks:
- Fixed spacing in IndexOutOfBoundException message thrown by
GroupAdapter.getGroup. - Removed duplicate databinding dependency (#279)
- Javadoc fixes for
AsyncDiffUtil#calculateDiffmethod. (#280)