Skip to content

Commit da665fc

Browse files
authored
Update README.md
1 parent 945aa17 commit da665fc

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,27 @@ ___
1414

1515
## Installation
1616

17-
Add it in your root build.gradle at the end of repositories:
18-
17+
1. Add it in your root build.gradle at the end of repositories:
18+
```groovy
1919
allprojects {
2020
repositories {
2121
...
2222
maven { url 'https://jitpack.io' }
2323
}
2424
}
25-
26-
Step 2. Add the dependency in app gradle
25+
```
26+
2727

28+
2. Add the dependency in app gradle
29+
30+
```groovy
2831
dependencies {
2932
implementation 'com.github.JDevZone:CheckableTextView:{latest_version}'
3033
}
31-
34+
```
3235
## Basic usage
3336

34-
```
37+
```xml
3538
<com.devzone.checkabletextview.CheckableTextView
3639
android:layout_marginTop="20dp"
3740
android:background="#e8e8e8"
@@ -45,11 +48,11 @@ Step 2. Add the dependency in app gradle
4548
```
4649
## Listen State Changes
4750
You can listen to state changes by registering a listener like as follows :
48-
```
51+
```kotlin
4952
checkedTV.setOnCheckChangeListener()
5053
```
5154
and get callback in implemented method :
52-
```
55+
```kotlin
5356
override fun onCheckChange(view: View, isChecked: Boolean) {
5457
// checkedTV returned as view
5558
// isChecked current state of the view

0 commit comments

Comments
 (0)