Releases: lisawray/groupie
v2.5.0
In this release:
- Added
detectMoves
parameter to GroupAdapter'supdate
andupdateAsync
methods as well asSection.update
. If you don't want moves detected in your changes, setting this to false will improve diffing performance. Look at the DiffUtil docs for more info on this. (PR #277) - Added
Section.clear()
method (PR #263, implements #251) - Added
GroupAdapter.getGroupCount()
method (PR #255) - Fixed
GroupDataObserver
not being registered forSection
headers and footers (PR #274, fixes #210) - Fixed
GroupAdapter.updateAsync
not registeringGroupDataObserver
s, which caused things like ExpandableGroups to not work properly (PR #275, fixes #261) - Fixed addItem at position not working for
ExpandableGroup
(PR #276, fixes #256)
❤ Thank you to all the contributors to this release: @remcomokveld, @JcMinarro, @nashcft & @akhahaha
v2.4.0
Thank you to @lisawray for granting access to the wider community so Groupie's development can continue 👍
In this release:
- Added
OnAsyncUpdateListener
that can be passed in to theGroupAdapter.updateAsync()
method in order to get a callback once the update is complete. (PR #230 , fixes #229) - Exposed
GroupAdapter.getGroup()
as public (PR #228, fixes #225) - Added
getViewType()
method toItem
. You can now have different items sharing the same layoutId in the same adapter. (PR #243, fixes #135) - Added
getChildCount()
method toExpandableGroup
. (PR #269, fixes #112) - Added
setExpanded(boolean isExpanded)
method toExpandableGroup
. (PR #270, fixes #108) - Standardized method parameter names (PR #227, fixes #226)
- Fixed a bug that getPosition returns wrong index when group does not exist (PR #231)
❤ Thank you to all the contributors to this release: @lisawray, @CORDEA, @rembacomokveld, @JcMinarro
v2.3.0
This release has some long-overdue bug fixes and small features.
- Pass your own DiffResult to GroupAdapter (#209)
- Redirect exceptions thrown from
updateAsync
to the main thread (#192) - Support stable ids (#215)
- Adds missing
remove
andremoveAll
functionality in ExpandableGroup (#191)
Thanks to @MrLogic85, @ExpensiveBelly, @PaulWoitaschek, @Nimrodda, @ubiratansoares, and @TheRealAWebb for this update. I did nothing in this release except fix conflicts. You guys are amazing!
v2.2
v2.1.0
This release introduces synchronous diffing for the whole adapter, as well as bug fixes and an update to Kotlin 1.2.41.
GroupAdapter.update(Collection<Group>)
Why synchronous? Currently all updates in Groupie are synchronous, aka on the main thread. They are also usually partial updates, meaning the only source of truth is the GroupAdapter itself. This made sense as the most efficient way to dispatch updates (right from the source) in a world before the new tools in the support library like DiffUtil or AsyncListDiffer, never mind Architecture Components and ViewModel.
If you need to dispatch an update to your whole list right now, and it is not huge, I hope this update is helpful. In the meantime, currently working on support for a one-way data flow with async diffing. Please watch this space. :)
v2.0.3
v2.0.2
v2.0.0
- Major change: Groupie 2.0 now supports pure Java and Kotlin! 🎉
The 1.0 library has been split into a core library (groupie
).
There are two optional supplemental modules for data binding and Kotlin extensions.
If you're new to the library, please check out the main README for instructions on getting started! In additional to using your existing ViewHolders, you can add new items to your list with shared generic viewholders using Kotlin Android Extensions or Android's data binding.
If you've been using the pre-release version, this is a breaking change in the groupie-kotlin-android-extensions
library.
- Fix for the problem where Kotlin Android extensions didn't support view caching in view holders. (Note, if you are using Kotlin Android extensions in your own viewholders and you are not manually caching the view references, you have this problem too.)
In order to enable support, please update to the latest Kotlin (at least 1.2) and enable the experimental flag using
androidExtensions {
experimental = true
}
The fixes necessary for view caching are already in the groupie-kotlin-android-extensions
library. However:
- References formerly on the item view such as
viewHolder.itemView.title
are now on the viewholder, e.g.viewHolder.title
. - The import required for Android Extensions has changed and no longer requires
.view.*
More information on the feature can be found here: https://github.com/Kotlin/KEEP/blob/master/proposals/android-extensions-entity-caching.md
- Bug fix in ExpandableGroup.addAll() (#108, #109)
- Bug fix for notifications in Section.removeAll()
- Add Group.removeAt(int index)
- Small fixes to example project
UpdatingGroup
is now deprecated andSection.update()
has been added.
Thanks to contributors @pzgz, @hardysim, @kjones, @SimonMarquis, and all others who have used and tested the last few releases!
Happy New Year :)
v2.0-alpha2
- Adds
@NonNull
and@Nullable
annotations to improve interop with Kotlin. - In order to return as few nullable objects as possible, the behavior of some methods has changed. In particular, methods like
getGroup(int)
andgetItem(int)
which used to returnnull
for missing Group now throwIndexOutOfBoundsException
. Group.setGroupDataObserver
is nowregister/unregisterGroupDataObserver
.- The example project has been rewritten in Kotlin with Android extensions.
- The standard library (no databinding)
Item.createViewHolder
now has a default implementation. The main reason is that if you use Kotlin Android extensions, you never need to create your own ViewHolders—just like the original implementation.
v2.0-alpha1
Vanilla groupie is now in module library (com.xwray.groupie) and groupie with databinding is now in module library-databinding (com.xwray.groupie.databinding). They are both available on jcenter.
Items that use data binding should now extend BindableItem.
A fun side effect of this rewrite is that you can mix and match regular Items and BindableItems (maybe in case you want to do a gradual rewrite of an existing RecyclerView?)