Until now, when I wanted to block the user from pressing the button, I would set thebutton.setClickable(false);
, and usually change the text to some kind of gray (to let the user know that the button is disabled). today I stumble on the setEnabled()
property.
So I went to the documentation to see that:
setEnabled(boolean enabled)
Set the enabled state of this view.
What the hell is that mean? what is the difference between enable state/clickable state and disabled state/ not clickable state? Some one could please explain what is the difference between doing what I was doing until now (using the clickable property) and using the setEnable
property? what should be used when? I search SO but could not find something related.
Thanks.