I have a ButtonView in an xml layout and set the focusable/clickable attributes to false. I’m attempting to prevent click events on the ButtonView until a flag is set to true. Anyway, this works fine until I write the setOnClickListner code on the ButtonView. It seems to automatically set setClickable() to true. Is there a way to prevent this, or is this the default behavior? I figured I could set the listener at any time, and ignore events until I set setClickable() on the Button. Thanks, any help is appreciated!
I have a ButtonView in an xml layout and set the focusable/clickable attributes to
Share
In addition to what Snicolas said.
You can disable the button for that purpose. Then no callback on the
setOCL()will be triggered when your button is clicked.