我遇到了一个问题:我有一个xml drawable,我想将其用作单选按钮的背景,但涟漪效果不起作用。有人可以帮助我吗?
我的背景xml代码:
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#8bc34a" >
<item>
<selector>
<item android:drawable="@drawable/tb_checked" android:state_checked="true"></item>
<item android:drawable="@drawable/transparent"></item>
</selector>
</item>
</ripple>
android:id="@android:id/mask"
吗? - Simeon Schaub