我正在使用Android v21的支持库。
我创建了一个带有自定义背景颜色的按钮。但是,当我使用这个背景颜色时,材料设计效果如波纹、揭示消失了(除了在点击时的高程效果)。
<Button
style="?android:attr/buttonStyleSmall"
android:background="?attr/colorPrimary"
android:textColor="@color/white"
android:textAllCaps="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button1"
/>
以下是一个普通按钮,效果正常。
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:text="Button1"
/>