我想在Buttons上使用涟漪效果.AppCompat v22.1为AppCompat着色添加了AppCompatButton和新功能.
我的布局:
<android.support.v7.widget.AppCompatButton
android:id="@+id/add_remove_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="@color/primary"
android:textColor="@android:color/white"
android:text="Remove" />
Run Code Online (Sandbox Code Playgroud)
在我的API 22测试设备上,涟漪效应完美无缺,但我正在编写API 11,不幸的是backgroundTint需要API> = 21.如何在旧API版本上将涟漪效果设置为按钮?