ebanx / swipe-button

A button that activates by swipe instead of touch
487 stars 101 forks source link

Xamarin Android - Set "On" state programmatically? Is this possible? #29

Closed WobblySlug closed 6 years ago

WobblySlug commented 6 years ago

Hey there.

I'm using your awesome button to enable a long running Android Service. When the user returns to the application I need to retain the "on" state for the button.

I can't seem to find a way to do this. Any suggestions?

Cheers

WobblySlug commented 6 years ago

Note that the .NET Nuget package does not allow me to use the "toggleState()" method.

WobblySlug commented 6 years ago

Also, same question but for setting text programmatically.

leandroBorgesFerreira commented 6 years ago

@Rhonage you can use setText() to change text programatically.