I use AppCompatButton buttons in my application (minSdk 9). The buttons in my application come in different colors and can become inactive ( setEnabled(false) ).
I want to make them flat and with ripple-animation, according to the material-design. But I can not ask them the color. Either the ripple effect is lost, or they cease to become gray in an inactive state.
How to set the color of the button so that the ripple effect is preserved, and in the inactive state were gray?
At the moment there is this:
<style name="MyGreenButton" parent="Widget.AppCompat.Button.Colored"> <item name="android:colorButtonNormal">#0f0</item> <item name="android:textColor">#fff</item> </style> <android.support.v7.widget.AppCompatButton android:theme="@style/MyGreenButton"/> The buttons change color, the text is white, but there is no ripple effect and in an inactive state the color remains green.