{"id":13643034,"url":"https://github.com/yuanwenbing/SelectorDrawable","last_synced_at":"2025-04-20T21:32:39.361Z","repository":{"id":126097690,"uuid":"74965660","full_name":"yuanwenbing/SelectorDrawable","owner":"yuanwenbing","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-07T03:11:00.000Z","size":3362,"stargazers_count":39,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T14:40:37.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuanwenbing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-28T11:15:26.000Z","updated_at":"2023-11-27T08:12:43.000Z","dependencies_parsed_at":"2023-08-14T02:30:42.442Z","dependency_job_id":null,"html_url":"https://github.com/yuanwenbing/SelectorDrawable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanwenbing%2FSelectorDrawable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanwenbing%2FSelectorDrawable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanwenbing%2FSelectorDrawable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanwenbing%2FSelectorDrawable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuanwenbing","download_url":"https://codeload.github.com/yuanwenbing/SelectorDrawable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249965547,"owners_count":21352925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:40.106Z","updated_at":"2025-04-20T21:32:39.089Z","avatar_url":"https://github.com/yuanwenbing.png","language":"Java","readme":"# Description\n\n主要用来为按钮设置selector,正常使用xml，不够灵活，而且代码量大，使用起来比较麻烦，定义这个类，使用Builder模式，使用起来比较灵活，可以设置圆角、描边，按下颜色，禁用颜色，选中颜色等，而且不需要太多的代码。\n\n# Captures\n![][image-1]\n\n# Use\n\n## Gradle\n\n\tcompile 'com.yuan.library.selector:selectordrawable-release:1.0.3'\n\n## Maven\n\n\t\u003cdependency\u003e\n\t  \u003cgroupId\u003e~com.yuan.library.selector\u003c/groupId\u003e\n\t  \u003cartifactId\u003eselectordrawable-release\u003c/artifactId\u003e\n\t  \u003cversion\u003e1.0.3\u003c/version\u003e\n\t  \u003ctype\u003epom\u003c/type\u003e\n\t\u003c/dependency\u003e\n\n# Example\n\n    // 使用颜色\n    SelectorFactory.create(new SelectorShape.SelectorBuilder()\n                                        .normalColor() // 正常颜色\n                                        .pressColor() // 按下颜色\n                                        .disableColor() // 禁用颜色\n                                        .selectColor() // 选择颜色\n                                        .shapeBuilder(new Shape.ShapeBuilder()\n                                        .corner() // 全部圆角\n                                        .leftTopCorner() // 左上圆角\n                                        .leftBottomCorner() // 左下圆角\n                                        .rightTopCorner() //右上圆角\n                                        .rightBottomCorner() // 右下圆角\n                                        .strokeColor() // 描边颜色\n                                        .strokeWidth()).build()) // 描边size\n    // 使用按钮                                    \n    SelectorFactory.create(new SelectorDrawable.SelectorBuilder()\n                                        .normalDrawable()\n                                        .pressDrawable()\n                                        .disableDrawable()\n                                        .selectDrawable().build())\n\n\n# About me\n- Mail：[wenbing1007@163.com][1]\n- QQ：11026979\n\n\n\n[1]:\tmailto:wenbing1007@163.com\n\n[image-1]:\thttps://raw.githubusercontent.com/yuanwenbing/SelectorDrawable/master/captures/demo.gif\n\n","funding_links":[],"categories":["Drawable"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanwenbing%2FSelectorDrawable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuanwenbing%2FSelectorDrawable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanwenbing%2FSelectorDrawable/lists"}