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?
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?
Simply
Where
myOnClickListener
is yourOnClickListener
that you used before! This line of code would need to go in theOnClickListener
for the 're-activation' button.Just set
confirm.setClickable(false);
to disable andconfirm.setClickable(true)
to enable it again.See Here