新建一个按钮 , 将这个设置为背景就可以
背景配置文件
<?xml version=\”1.0\” encoding=\”utf-8\”?>
<layer-list xmlns:android=\”http://schemas.android.com/apk/res/android\”>
<!– 边框 –>
<item>
<shape android:shape=\”oval\” >
<solid android:color=\”@color/white\” />
<size android:width=\”168dp\” android:height=\”168dp\”/>
</shape>
</item>
<!– 按下效果 –>
<item android:bottom=\”8dp\” android:right=\”8dp\” android:top=\”8dp\” android:left=\”8dp\” >
<selector xmlns:android=\”http://schemas.android.com/apk/res/android\”>
<item android:state_pressed=\”true\”>
<shape android:shape=\”oval\” >
<solid android:color=\”#e66b4f\” />
<size android:width=\”168dp\” android:height=\”168dp\”/>
</shape>
</item>
<item>
<shape android:shape=\”oval\” >
<solid android:color=\”#f3876f\” />
<size android:width=\”168dp\” android:height=\”168dp\”/>
</shape>
</item>
</selector>
</item>
</layer-list>
转载于:Android开发/tslin