File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
4750You can listen to state changes by registering a listener like as follows :
48- ```
51+ ``` kotlin
4952checkedTV.setOnCheckChangeListener()
5053```
5154and get callback in implemented method :
52- ```
55+ ``` kotlin
5356override fun onCheckChange (view : View , isChecked : Boolean ) {
5457 // checkedTV returned as view
5558 // isChecked current state of the view
You can’t perform that action at this time.
0 commit comments