Skip to content

Commit

Permalink
Issue #1: Improve How to use documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Feb 10, 2022
1 parent 8d3dafc commit a3bb9c1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/how_to_use.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to use?

EasyAdapter has 3 type of annotations that help you to generate your adapter
EasyAdapter has 3 types of annotations that help you to generate your adapter

- Adapters Annotations:
Used to select the Adapter type and set the list item for it.
Expand Down Expand Up @@ -31,4 +31,17 @@ data class Model (
@BindAlpha("model_avatar")
val avatarAlpha : Float,
)
```
```

Now after you build the project you will find a generated adapter called `ModelListAdapter`,
this default name come from the model class name (`Model`) + the adapter name (`ListAdapter`),
you can change it easily by passing your custom name in the adapter Annotation,

And now you can use this adapter like any other normal adapter

```
val adapter = ModelListAdapter()
recyclerView.adapter = adapter
```

You can find a full documentation and example for each annotation in it section.

0 comments on commit a3bb9c1

Please sign in to comment.