android studio button color code example
Example 1: button style android studio
style="@style/Widget.AppCompat.Button"
style="@style/Widget.AppCompat.Button.Colored"
style="@style/Widget.AppCompat.Button.Borderless"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
Example 2: android studio change button color programmatically
Button11.setBackgroundColor(getResources().getColor(R.color.red));
Button11.setBackgroundColor(Button11.getContext().getResources().getColor(R.color.red));
Example 3: android studio change button color programmatically
Button11.setBackgroundColor(0xFFFF0000);