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
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,14 @@ Makes the use of RecyclerView easier, modular and less error-prone.
4
4
5
5
Standard `RecyclerView.Adapter` is tedious to work with, because you have to write repetitive boilerplate and spaghetti code and to concentrate all your items view logic and binding into the adapter itself, which is really bad. This library was born to be able to have the following for each element in a recycler view:
6
6
7
-
* an XML layout file, in which to define the item's view hierarchy
8
-
* a view model file (called `Item`), in which to specify the binding between the model and the view and in which to handle user interactions with the item.
7
+
* a `model`, which is a simple `data class`
8
+
* a programmatic `View` or an XML layout file, in which to define the item's view hierarchy
9
+
* a `view model` file (called `AdapterItem`), in which to specify the binding between the model and the view and in which to handle user interactions with the item.
9
10
10
11
In this way every item of the recycler view has its own set of files, resulting in a cleaner and easier to maintain code base.
11
12
13
+
This allows also to write completely declarative UIs, using stock Android View system and be able to already write something similar to [JetPack Compose](https://developer.android.com/jetpack/compose) and use it in production.
14
+
12
15
# Index
13
16
14
17
*[Setup](#setup)
@@ -36,10 +39,10 @@ In this way every item of the recycler view has its own set of files, resulting
36
39
## <aname="setup"></a>Setup
37
40
In your gradle dependencies add:
38
41
```groovy
39
-
def recyclerAdapterVersion = "2.9.0" // change it with the version you want to use
42
+
def recyclerAdapterVersion = "x.y.z" // change it with the version you want to use
This is the latest Bintray version: [](https://bintray.com/gotev/maven/recycler-adapter/_latestVersion)
45
+
This is the latest version: [](https://bintray.com/gotev/maven/recycler-adapter/_latestVersion)
43
46
44
47
Due to some prolonged Bintray outages, an alternative maven repo has been set. If the dependencies are not resolved, add this to your maven repos:
0 commit comments