This answer assumes using appcompat-v7 support library 23.2.1.
With reference to Lollipop's backgroundTint has no effect on a Button, it is indeed not possible to tint a button natively in Android 5.0. (In Android 5.1 they fixed it so that it is possible.)
Even when not using the appcompat library, <Button android:backgroundTint="..."/>
does not work. The button stays grey.
Examining the source code of appcompat version 23.2.1, it seems that the compatibility tinting is only applied on Android 4.4 and below. On Android 5.0 and above, it uses the native tinting. Unfortunately that is the wrong way to go. On Android 5.0, the compatibility tinting should be applied as well.
You can force compatibility tinting by calling setSupportBackgroundTintList
on the button from your code and the tinting will happen correctly on Android 5.0.
One of the possible solutions is to subclass AppCompatButton
as follows:
public class AppCompatButton2 extends AppCompatButton {
public AppCompatButton2(final Context context, final AttributeSet attrs) {
super(context, attrs);
if (android.os.Build.VERSION.SDK_INT >= 21) {
final ColorStateList csl = getBackgroundTintList();
setSupportBackgroundTintList(csl);
}
}
}