I have a ToggleButton and I need to set up simple click actions. How do I implement a simple click listener for a ToggleButton?
If you need details please ask.
this.someToggleButton = (ToggleButton)findViewById(R.id.someToggleButton) ;
this.someToggleButton.setOnCheckedChangeListener( new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {
doSomethingWith(toggleButton, isChecked) ;
}
}) ;