File tree 2 files changed +6
-5
lines changed
togglebuttonlayout/src/main/java/com/savvyapps/togglebuttonlayout 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import android.graphics.drawable.Drawable
5
5
/* *
6
6
* An item within a [ToggleButtonLayout]
7
7
*/
8
- class Toggle (
8
+ data class Toggle (
9
9
10
10
/* *
11
11
* The ID provided within the Toggle
@@ -20,7 +20,8 @@ class Toggle(
20
20
/* *
21
21
* Optional title
22
22
*/
23
- val title : CharSequence? ) {
23
+ val title : CharSequence?
24
+ ) {
24
25
25
26
/* *
26
27
* The selection state of the toggle
@@ -29,13 +30,13 @@ class Toggle(
29
30
30
31
31
32
/* *
32
- * Get the parent view of the toggle. Null if not yet inflated
33
+ * Get the parent view of the toggle. Null if its view has not been inflated
33
34
*/
34
35
var toggleButtonLayout: ToggleButtonLayout ? = null
35
36
internal set
36
37
37
38
/* *
38
- * The current toggle view. Null if not yet inflated
39
+ * The current toggle view. Null if its view has not been inflated
39
40
*/
40
41
var toggleView: ToggleView ? = null
41
42
internal set
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class ToggleButtonLayout : CardView {
116
116
/* *
117
117
* Listen for when toggles get selected and deselected
118
118
*/
119
- var onToggledListener: ((toggleButtonLayout: ToggleButtonLayout ? , toggle: Toggle , selected: Boolean ) -> Unit )? = null
119
+ var onToggledListener: ((toggleButtonLayout: ToggleButtonLayout , toggle: Toggle , selected: Boolean ) -> Unit )? = null
120
120
121
121
constructor (context: Context ) : super (context) {
122
122
init (context, null )
You can’t perform that action at this time.
0 commit comments