我有一个具有以下背景的按钮:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true"><shape android:shape="oval">
<gradient android:centerX="50%" android:centerY="50%" android:endColor="#d91d1d" android:gradientRadius="20" android:startColor="#8c3131" android:type="radial" />
<corners android:radius="5dp" />
<stroke android:width="1.75dp" android:color="#DF1B1D" />
<padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="1dp" />
</shape></item>
<item><shape android:shape="oval">
<gradient android:centerX="50%" android:centerY="50%" android:endColor="#d91d1d" android:gradientRadius="20" android:startColor="#8c3131" android:type="radial" />
<corners android:radius="5dp" />
<stroke android:width="1.10dp" android:color="#FFFFFF" />
<padding android:bottom="2dp" android:left="4dp" android:right="4dp" android:top="1dp" />
</shape></item>
而且我需要在代码中编辑渐变颜色和笔触颜色(两者的颜色不同)。(我可能有大约 20 个状态)找不到如何编辑按钮的笔触颜色或渐变颜色。
谢谢