I have around 18 views and a button that has onclicklisteners. My goal is to disable the listeners on the 18 views once the button is clicked to avoid them from getting flipped over again once they are pressed.
My problem: after i have initialized the onclicklisteners those 18 views still has their listeners and stil doing the method being called once they are clicked. I have tried setting click listeners to null and setting clickable to false and they are still clickable. Any way to disable theses views from being pressed? Method to disable:
private void makeUnclickable() {
for (int x = 9; x < 9; x++) {
front[x].setOnClickListener(null);
back[x].setOnClickListener(null);
front[x].setClickable(false);
back[x].setClickable(false);
}
}