For general change:
button.Color = Colors.Blue
But in this case the button is blue in all states.
To use different colors for the button states (disabled, pressed, normal, ...) you must use StateListDrawable and ColorDrawables.
See example here: link
For general change:
button.Color = Colors.Blue
But in this case the button is blue in all states.
To use different colors for the button states (disabled, pressed, normal, ...) you must use StateListDrawable and ColorDrawables.
See example here: link
To make your sub more reusable it would be better to pass the required color as a parameter. But if always wanting the same colour then of course you can stick with what you have already.
To make your sub more reusable it would be better to pass the required color as a parameter. But if always wanting the same colour then of course you can stick with what you have already.