I have three xml for three types of buttons.
I develop a small quiz on Android and I designed the above XML to evaluate the responses and display the color of the button based on the answer.
boton_redondo: default for all buttons
boton_redondo_error: If the answer is wrong
correct_right_button: if the answer is correct
The problem is that I do not find the right instruction to change the color of the button when I click. I'm trying with that:
& # 39; & # 39; & # 39; r1.setBackground (getDrawable (R.drawable.boton_redondo_error))); & # 39; & # 39; & # 39;
Someone who can help me with that?