You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last stable release ONLY supported data binding. It was:
25
-
```gradle
26
-
compile 'com.xwray:groupie:1.1.1'
22
+
compile 'com.xwray:groupie-databinding:2.0.0'
27
23
```
28
24
29
25
Which one to choose? It's up to you and what your project already uses. You can even use Kotlin and data binding together.[<sup>*</sup>](#kotlin-and-data-binding) Or all your existing hand-written Java ViewHolders, and one new Kotlin item to try it out. Go crazy!
@@ -60,30 +56,15 @@ section.removeHeader(); // results in a remove event for 1 item in the adapter,
60
56
```
61
57
62
58
There are a few simple implementations of Groups within the library:
63
-
-`Section`, a list of body content with an optional header group and footer group.
59
+
-`Section`, a list of body content with an optional header group and footer group. It supports diffing
64
60
-`ExpandableGroup`, a single parent group with a list of body content that can be toggled hidden or shown.
65
61
-`UpdatingGroup`, a list of items which can diff its previous and new contents and animate moves, updates and other changes
66
62
67
-
Groups are flexible and composable. They can be combined and nested to arbitrary depth. For example, you could make an UpdatingSection by adding a single UpdatingGroup to the content of a Section.
68
-
69
-
```java
70
-
publicclassUpdatingSectionextendsSection {
71
-
privatefinalUpdatingGroup updatingGroup;
72
-
73
-
publicUpdatingSection() {
74
-
setHeader(newHeaderItem("Updating section!");
75
-
updatingGroup =newUpdatingGroup();
76
-
}
77
-
78
-
publicvoid update(List<Item> list) {
79
-
updatingGroup.update(list);
80
-
}
81
-
}
82
-
```
63
+
Groups are flexible and composable. They can be combined and nested to arbitrary depth.
83
64
84
65
Life is messy, so groups are designed so that making new ones and defining their behavior is easy. You should make many small, simple, custom groups as the need strikes you.
85
66
86
-
You can implement the `Group` interface directly if you want. However, in most cases, you should extend the base implementation, `NestedGroup`. NestedGroup provides support for arbitrary nesting of groups, registering/unregistering listeners, and fine-grained change notifications to support animations and updating the adapter.
67
+
You can implement the `Group` interface directly if you want. However, in most cases, you should extend `Section` or the base implementation, `NestedGroup`. Section supports common RV paradigms like diffing, headers, footers, and placeholders. NestedGroup provides support for arbitrary nesting of groups, registering/unregistering listeners, and fine-grained change notifications to support animations and updating the adapter.
87
68
88
69
## Items
89
70
@@ -94,15 +75,15 @@ Groupie abstracts away the complexity of multiple item view types. Each Item de
94
75
The `Item` class gives you simple callbacks to bind your model object to the generated fields. Because of Kotlin Android extensions, there's no need to write a view holder.
0 commit comments