先把来源贴上
http://www.dibbus.com/2011/02/gradient-buttons-for-android/
然后再让大家看看效果,这些都是xml布局文件实现的,一张图片都未曾使用。
顺便贴出几个布局文件给大家看看:
android:color="#449def" />
android:width="1dp"
android:color="#2f6699" />
android:radius="3dp" />
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
android:startColor="#449def"
android:endColor="#2f6699"
android:angle="270" />
android:width="1dp"
android:color="#2f6699" />
android:radius="4dp" />
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
android:left=”10dp”
android:top=”7dp”
android:right=”10dp”
android:bottom=”7dp”
/>
android:bottomRightRadius=”5dp”
android:bottomLeftRadius=”5dp”
android:topLeftRadius=”5dp”
android:topRightRadius=”5dp”
/>
android:angle=”90″
android:startColor=”#4747e0″
android:centerColor=”#5b5bcd”
android:endColor=”#6f6fcf”
android:type=”linear”
/>
这里有个工程,开源的
顺便把这两个网页给收了,说不定以后能够提供灵感或者参考