Skip to content

Commit a78fbfb

Browse files
committed
Update readme.
1 parent cee05d3 commit a78fbfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A container of toggle buttons, supports multiple / single selection and button c
99

1010
```
1111
dependencies {
12-
compile 'com.nex3z:toggle-button-group:1.0.0'
12+
compile 'com.nex3z:toggle-button-group:1.0.1'
1313
}
1414
```
1515

@@ -143,11 +143,11 @@ You can implement custom toggle button in three ways,
143143

144144
- Extend [`CompoundButton`][CompoundButton] class
145145

146-
`CompoundButton` implements [`Checkable`][Checkable] interface, toggles itself when being clicked and provides listener for `ToggleButtonGroup` to keep track of its checked state. `CompoundButton` is basically a [`Button`][Button] / [`TextView`][TextView]. You can add your custom style and behaviour to the button like [`CustomCompoundButton`][CustomCompoundButton] from the sample.
146+
[`CompoundButton`][CompoundButton] implements [`Checkable`][Checkable] interface, toggles itself when being clicked and provides listener for [`ToggleButtonGroup`][ToggleButtonGroup] to keep track of its checked state. [`CompoundButton`][CompoundButton] is basically a [`Button`][Button] / [`TextView`][TextView]. You can add your custom style and behaviour to the button like [`CustomCompoundButton`][CustomCompoundButton] from the sample.
147147

148148
- or, implement [`ToggleButton`][ToggleButton] interface
149149

150-
If you choose to implement [`ToggleButton`][ToggleButton], besides the [`Checkable`][Checkable] interface, you also need to implement a `setOnCheckedChangeListener()`, which allows [`ToggleButtonGroup`][ToggleButtonGroup] to listen to the changes of any checked states. You need to handle the click event on the button and toggle its checked state properly, as `ToggleButtonGroup` will not toggle the button when it's being clicked. [`CustomToggleButton`][CustomToggleButton] from the sample is a simple toggle button implementing [`ToggleButton`][ToggleButton].
150+
If you choose to implement [`ToggleButton`][ToggleButton], besides the [`Checkable`][Checkable] interface, you also need to implement a `setOnCheckedChangeListener()`, which allows [`ToggleButtonGroup`][ToggleButtonGroup] to listen to the changes of any checked states. You need to handle the click event on the button and toggle its checked state properly, as [`ToggleButtonGroup`][ToggleButtonGroup] will not toggle the button when it's being clicked. [`CustomToggleButton`][CustomToggleButton] from the sample is a simple toggle button implementing [`ToggleButton`][ToggleButton].
151151

152152
- or, extend [`CompoundToggleButton`][CompoundToggleButton] class.
153153

@@ -157,6 +157,7 @@ For more detail, please check the [sample].
157157

158158

159159
[CompoundButton]: https://developer.android.com/reference/android/widget/CompoundButton.html
160+
[ToggleButtonGroup]: https://github.com/nex3z/ToggleButtonGroup/blob/master/togglebuttongroup/src/main/java/com/nex3z/togglebuttongroup/ToggleButtonGroup.java
160161
[Button]: https://developer.android.com/reference/android/widget/Button.html
161162
[TextView]: https://developer.android.com/reference/android/widget/TextView.html
162163
[CustomCompoundButton]: https://github.com/nex3z/ToggleButtonGroup/blob/master/sample/src/main/java/com/nex3z/togglebuttongroup/sample/button/CustomCompoundButton.java
@@ -165,5 +166,4 @@ For more detail, please check the [sample].
165166
[CompoundToggleButton]: https://github.com/nex3z/ToggleButtonGroup/blob/master/togglebuttongroup/src/main/java/com/nex3z/togglebuttongroup/button/CompoundToggleButton.java
166167
[CustomCompoundToggleButton]: https://github.com/nex3z/ToggleButtonGroup/blob/master/sample/src/main/java/com/nex3z/togglebuttongroup/sample/button/CustomCompoundToggleButton.java
167168
[Checkable]: https://developer.android.com/reference/android/widget/Checkable.html
168-
[ToggleButtonGroup]: https://github.com/nex3z/ToggleButtonGroup/blob/master/togglebuttongroup/src/main/java/com/nex3z/togglebuttongroup/ToggleButtonGroup.java
169169
[sample]: https://github.com/nex3z/ToggleButtonGroup/tree/master/sample/src/main/java/com/nex3z/togglebuttongroup/sample

0 commit comments

Comments
 (0)