Android用drawable文件设置边框的stroke梯度渐变
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<shape android:shape="rectangle">
android:angle="270"
android:endColor="#FF8F00"
android:startColor="#ff0000"
android:type="linear" />
android:width="50dp"
android:height="24dp" />
<corners android:radius="3dp"/>
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp">
<shape android:shape="rectangle">
<solid android:color="#fff" />
<corners android:radius="3dp"/>