2

I have implemented a button for toggle purpose of the app state. But after disabling button(setEnabled(false)) I can not capture the click of button.

Is there any way to listen to the click of disabled button?

3
  • 3
    how can one click a disabled button?
    – ogzd
    Mar 9, 2013 at 12:36
  • 2
    Once disabled, it will stop listening for any clicks. That's the whole point of disabling something eh? ;-) Mar 9, 2013 at 12:36
  • Seems pretty legit. Use ToggleButton instead, because once a button is disabled, it's not possible for a user to click it again.
    – Rob
    Mar 9, 2013 at 12:37

1 Answer 1

3

There is a reason why the Android guys developed a ToggleButton.

You should be using a ToggleButton and not a normal standard Button to implement toggling operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.