Skip to content

ToggleButtonLayout: Add self reference to OnToggledListener callback#17

Merged
Jawnnypoo merged 1 commit intosavvyapps:masterfrom
bmc08gt:master
Jun 7, 2019
Merged

ToggleButtonLayout: Add self reference to OnToggledListener callback#17
Jawnnypoo merged 1 commit intosavvyapps:masterfrom
bmc08gt:master

Conversation

@bmc08gt
Copy link
Copy Markdown
Contributor

@bmc08gt bmc08gt commented Jun 7, 2019

Signed-off-by: Brandon McAnsh [email protected]

* Also provide ToggleButtonLayout reference per Toggle

* Fixes savvyapps#10

Signed-off-by: Brandon McAnsh <[email protected]>
* Listen for when toggles get selected and deselected
*/
var onToggledListener: ((toggle: Toggle, selected: Boolean) -> Unit)? = null
var onToggledListener: ((v: View?, toggle: Toggle, selected: Boolean) -> Unit)? = null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make v: View? into toggleButtonLayout: ToggleButtonLayout? instead?

@Jawnnypoo
Copy link
Copy Markdown
Contributor

This does break binary compatibility unfortunately, so it would need a 1.3.0 and some migration instructions.

@Jawnnypoo Jawnnypoo merged commit 0b25786 into savvyapps:master Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Ability to get ToggleButtonLayout from Toggle

2 participants