Skip to content

Commit

Permalink
Updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourabh Singh Rawat committed Oct 30, 2019
1 parent 21c46e8 commit 27dfa38
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {

## Usage

For a list of data:
```
private val rvAdapter by lazy {
adapter(R.layout.item_layout, listOf("One", "Two")) {
Expand All @@ -35,3 +36,14 @@ private val rvAdapter by lazy {
}
}
```
For a flow stream:
```
private val rvAdapter by lazy {
adapter(R.layout.item_layout, flowOf("One", "Two"), coroutineScope) {
bindings {
bind<TextView>(R.id.count_text) { datum, countTextView ->
countTextView.text = datum
}
}
}
}

0 comments on commit 27dfa38

Please sign in to comment.