0
How to catch the state of ToggleButton
if this on or off, I looked at the Android documentation only has the method of changing the state, I needed to get the status of the button to make the comparison.
0
How to catch the state of ToggleButton
if this on or off, I looked at the Android documentation only has the method of changing the state, I needed to get the status of the button to make the comparison.
2
the method is isChecked(). It is inherited from the Compoundbutton class.
Ex:
if(myToggleButton.isChecked())
// Faça algo se estiver checado
else
// Faça algo se não estiver checado
Browser other questions tagged android button widget toggle
You are not signed in. Login or sign up in order to post.