btn_small_round.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <selector xmlns:android="http://schemas.android.com/apk/res/android">
  3. <!-- pressed state of button, only change: color of actual button -->
  4. <item android:state_pressed="true" >
  5. <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  6. <!-- shadow, a little down and a little to the right -->
  7. <item><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  8. <gradient android:angle="270" android:endColor="#99000000" android:startColor="#99000000" />
  9. </shape></item>
  10. <!-- this is the actual button -->
  11. <item android:bottom="1px" android:right="1px"><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  12. <gradient android:angle="270" android:endColor="#47ffffff" android:startColor="#97ffffff" />
  13. </shape></item>
  14. </layer-list>
  15. </item>
  16. <!-- focused state of button, only change: color of actual button -->
  17. <item android:state_focused="true" >
  18. <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  19. <!-- shadow, a little down and a little to the right -->
  20. <item><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  21. <gradient android:angle="270" android:endColor="#22000000" android:startColor="#22000000" />
  22. </shape></item>
  23. <!-- this is the actual button -->
  24. <item android:bottom="1px" android:right="1px"><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  25. <gradient android:angle="270" android:endColor="#47ffffff" android:startColor="#97ffffff" />
  26. </shape></item>
  27. </layer-list>
  28. </item> <!-- normal state of button. Template for other states. -->
  29. <item>
  30. <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  31. <!-- shadow, a little down and a little to the right -->
  32. <item>
  33. <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  34. <gradient android:angle="270" android:endColor="#55000000" android:startColor="#55000000" />
  35. </shape></item>
  36. <!-- this is the actual button -->
  37. <item android:bottom="1px" android:right="1px">
  38. <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
  39. <gradient android:angle="270" android:endColor="#47ffffff" android:startColor="#97ffffff" />
  40. </shape>
  41. </item>
  42. </layer-list>
  43. </item>
  44. </selector>