File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
togglebuttonlayout/src/main/java/com/savvyapps/togglebuttonlayout Expand file tree Collapse file tree 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
55/* *
66 * An item within a [ToggleButtonLayout]
77 */
8- class Toggle (
8+ data class Toggle (
99
1010 /* *
1111 * The ID provided within the Toggle
@@ -20,7 +20,8 @@ class Toggle(
2020 /* *
2121 * Optional title
2222 */
23- val title : CharSequence? ) {
23+ val title : CharSequence?
24+ ) {
2425
2526 /* *
2627 * The selection state of the toggle
@@ -29,13 +30,13 @@ class Toggle(
2930
3031
3132 /* *
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
3334 */
3435 var toggleButtonLayout: ToggleButtonLayout ? = null
3536 internal set
3637
3738 /* *
38- * The current toggle view. Null if not yet inflated
39+ * The current toggle view. Null if its view has not been inflated
3940 */
4041 var toggleView: ToggleView ? = null
4142 internal set
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class ToggleButtonLayout : CardView {
116116 /* *
117117 * Listen for when toggles get selected and deselected
118118 */
119- var onToggledListener: ((toggleButtonLayout: ToggleButtonLayout ? , toggle: Toggle , selected: Boolean ) -> Unit )? = null
119+ var onToggledListener: ((toggleButtonLayout: ToggleButtonLayout , toggle: Toggle , selected: Boolean ) -> Unit )? = null
120120
121121 constructor (context: Context ) : super (context) {
122122 init (context, null )
You can’t perform that action at this time.
0 commit comments