xml - clickable and unclickable button android Studio -


this screenshot of appi making small application , want do: every time click on "+" button, want increment counter have done. every time click "-" button, want decrement counter again, have done. however, when value of counter reaches 0, want button "-" no longer clickable , greyed out, how able this?

what can in oncreate method

button fewer=(button)findviewbyid(r.id.fewer); 

and can use .setclickable(false);


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -