Put the source on first.
http://zrgiu.com/blog/2011/01/making-your-android-app-look-better/
Http://www.dibbus.com/2011/02/gradient-buttons-for-android/
Http://www.dibbus.com/2011/08/even-more-gradient-buttons-for-android/
And then let's look at the effect, these are XML layout file implementation, a picture has not been used.
By the way, post a few layout files for everyone to see:
Copy Code code as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<selector xmlns:android= "Http://schemas.android.com/apk/res/android" >
<item android:state_pressed= "true" >
<shape>
<solid
Android:color= "#449def"/>
<stroke
Android:width= "1DP"
Android:color= "#2f6699"/>
<corners
android:radius= "3DP"/>
<padding
android:left= "10DP"
android:top= "10DP"
android:right= "10DP"
android:bottom= "10DP"/>
</shape>
</item>
<item>
<shape>
<gradient
Android:startcolor= "#449def"
Android:endcolor= "#2f6699"
android:angle= "270"/>
<stroke
Android:width= "1DP"
Android:color= "#2f6699"/>
<corners
android:radius= "4DP"/>
<padding
android:left= "10DP"
android:top= "10DP"
android:right= "10DP"
android:bottom= "10DP"/>
</shape>
</item>
</selector>
Copy Code code as follows:
<?xml version= "1.0″encoding=" utf-8″?>
<shape xmlns:android= "Http://schemas.android.com/apk/res/android" >
<solid android:color= "#F000 ″/>
<stroke android:width= "1px" android:color= "#BB000000 ″/>
<padding
android:left= "10DP"
android:top= "7DP"
android:right= "10DP"
Android:bottom= "7DP"
/>
<corners
Android:bottomrightradius= "5DP"
Android:bottomleftradius= "5DP"
Android:topleftradius= "5DP"
Android:toprightradius= "5DP"
/>
<gradient
Android:angle= "90″
Android:startcolor= "#4747e0 ″
Android:centercolor= "#5b5bcd"
Android:endcolor= "#6f6fcf"
Android:type= "Linear"
/>
</shape>
Here's a project, open source.
Http://code.google.com/p/android-gradients-sample/downloads/list
By the way, the two pages have been collected, perhaps to provide inspiration or reference
Http://www.webdesignshock.com/css-button
Http://www.jb51.net/css/23418.html