f496784ad2830c1a3cd8f0c7c7c2fb475529b82f.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <resources xmlns:tools="http://schemas.android.com/tools">
  3. <!-- 仿 ios 开关按钮 -->
  4. <declare-styleable name="SwitchButton" tools:ignore="ResourceName">
  5. <!-- 是否选中 -->
  6. <attr name="android:checked" />
  7. <!-- 是否禁用 -->
  8. <attr name="android:enabled" />
  9. </declare-styleable>
  10. <!-- 设置栏 -->
  11. <declare-styleable name="SettingBar" tools:ignore="ResourceName">
  12. <!-- 左边 -->
  13. <attr name="bar_leftText" format="string"/>
  14. <attr name="bar_leftHint" format="string"/>
  15. <attr name="bar_leftIcon" format="reference" />
  16. <attr name="bar_leftColor" format="color" />
  17. <attr name="bar_leftSize" format="dimension" />
  18. <attr name="bar_leftColorHint" format="color" />
  19. <!-- 右边 -->
  20. <attr name="bar_rightText" format="string" />
  21. <attr name="bar_rightHint" format="string"/>
  22. <attr name="bar_rightIcon" format="reference" />
  23. <attr name="bar_rightColor" format="color" />
  24. <attr name="bar_rightSize" format="dimension" />
  25. <!-- 分割线 -->
  26. <attr name="bar_lineVisible" format="boolean" />
  27. <attr name="bar_lineColor" format="reference|color" />
  28. <attr name="bar_lineSize" format="dimension" />
  29. <attr name="bar_lineMargin" format="dimension" />
  30. </declare-styleable>
  31. <!-- 自定义数字进度条 -->
  32. <declare-styleable name="NumberProgressBar" tools:ignore="ResourceName">
  33. <attr name="pb_progress" format="integer"/>
  34. <attr name="pb_maxProgress" format="integer"/>
  35. <attr name="pb_textSize" format="dimension"/>
  36. <attr name="pb_textColor" format="color"/>
  37. <attr name="pb_textOffset" format="dimension"/>
  38. <attr name="pb_unreachedColor" format="color"/>
  39. <attr name="pb_reachedColor" format="color"/>
  40. <attr name="pb_reachedHeight" format="dimension"/>
  41. <attr name="pb_unreachedHeight" format="dimension"/>
  42. </declare-styleable>
  43. <!-- 正则表达式编辑框 -->
  44. <declare-styleable name="RegexEditText">
  45. <!-- 正则输入限制 -->
  46. <attr name="inputRegex" format="string" />
  47. <!-- 常用正则类型 -->
  48. <attr name="regexType" >
  49. <!-- 手机号(只能以 1 开头) -->
  50. <enum name="mobile" value="0x01" />
  51. <!-- 中文(普通的中文字符) -->
  52. <enum name="chinese" value="0x02" />
  53. <!-- 英文(大写和小写的英文) -->
  54. <enum name="english" value="0x03" />
  55. <!-- 整数(非 0 开头的数字) -->
  56. <enum name="count" value="0x04" />
  57. <!-- 用户名(中文、英文、数字) -->
  58. <enum name="name" value="0x05" />
  59. <!-- 非空格字符 -->
  60. <enum name="nonnull" value="0x06" />
  61. </attr>
  62. </declare-styleable>
  63. </resources>