<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:startColor="#4CC417" android:endColor="#7C4124" android:angle="270"/>
<corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp" android:topLeftRadius="7dp" android:topRightRadius="7dp"/>
</shape>
This is my custom button x开发者_StackOverflow社区ml. I want to modify the code to get two or more colors.
A gradient from startColor to endColor already gives 2 colors. A center color can be added by using android:centerColor="#hexcode".
加载中,请稍侯......
精彩评论