解决方法
您可以使用渐变.根据需要在选择器中设置不同的渐变.完成!
这是你想要的,设置你的颜色.请享用!
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:bottom="30dp"> <shape android:shape="rectangle" > <corners android:topRightRadius="8dip" android:topLeftRadius="8dip" /> <gradient android:startColor="#030303" android:endColor="#3B3B3B" android:angle="270" /> </shape> </item> <item android:top="30dp" > <shape android:shape="rectangle" > <corners android:bottomLeftRadius="8dip" android:bottomRightRadius="8dip" /> <gradient android:startColor="#4B5057" android:endColor="#4B5059" android:angle="270" /> <size android:height="30dp" /> </shape> </item> </layer-list>