I have set mButton.setClickable(false); in my code but still this button is invoked by global button.setOnClickListener of my code.
mButton.setClickable(false);
button.setOnClickListener
EDIT:
Instead of using setClickable(false) use following
button.setFocusableInTouchMode(false);
I had the same problem in my app where i needed to set my button not to clickable in certain conditions. this worked for me. Hope this helps.