Skip to content

Commit

Permalink
Update doc for binds to add BindTextColor Example
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Feb 24, 2022
1 parent 227748c commit eb825ac
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/annotations/binds.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,26 @@ val backgroundVisibility : Int = View.GONE
```kotlin
@BindVisibility("main_background", "item.background.isEmpty()")
val backgroundVisibility : Int = View.GONE
```

### @BindTextColor

Used to annotate integers which represent Text color

Parameters:

- viewId: the id of the View

- condition: a condition to used and apply the bind only if this condition is evaluated to true

Examples:

```kotlin
@BindTextColor("user_name")
val titleColor : Int = Color.BLACK
```

```kotlin
@BindTextColor("user_name", "item.title.isEmpty()")
val titleColor : Int = Color.BLACK
```

0 comments on commit eb825ac

Please sign in to comment.