I would like to know how to set the button color programatically? I have coded the following but fails:
Button11.setBackgroundColor(R.color.red);
button.setBackgroundColor(getResources().getColor(R.color.red);
Sets the background color for this view. Parameters: color the color of the background
R.color.red is a reference generated at the compilation in gen.
R.color.red