Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set OnClickListener off and then on

Tags:

android

button

I am setting the OnClickListener off after the user has clicked on the button.

confirm.setOnClickListener(null);

This makes the button unclickable but I want it to be clickable after the user has clicked another button.

How can I do this?

like image 973
Tommy Avatar asked Mar 08 '11 20:03

Tommy


1 Answers

Just set

confirm.setClickable(false); to disable and confirm.setClickable(true) to enable it again.

See Here

like image 126
Will Tate Avatar answered Oct 16 '22 13:10

Will Tate