{"id":13639399,"url":"https://github.com/799536960/switchView","last_synced_at":"2025-04-19T22:32:22.237Z","repository":{"id":217102038,"uuid":"92131541","full_name":"799536960/switchView","owner":"799536960","description":"带有文字的switch","archived":false,"fork":false,"pushed_at":"2017-05-31T12:47:41.000Z","size":315,"stargazers_count":82,"open_issues_count":2,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T09:38:17.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/799536960.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-23T05:07:59.000Z","updated_at":"2024-07-14T23:08:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a17e7d7-a4f6-451e-88fd-340331749c47","html_url":"https://github.com/799536960/switchView","commit_stats":null,"previous_names":["799536960/switchview"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/799536960%2FswitchView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/799536960%2FswitchView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/799536960%2FswitchView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/799536960%2FswitchView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/799536960","download_url":"https://codeload.github.com/799536960/switchView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249822202,"owners_count":21329935,"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:00.268Z","updated_at":"2025-04-19T22:32:22.231Z","avatar_url":"https://github.com/799536960.png","language":"Java","readme":"# switchView\n![](https://github.com/799536960/switchView/blob/master/20170524104352-7c011ad592.%5Bgif-2-mp4.com%5D.gif)  \n\n\n```java\n\u003ccom.duma.ld.mylibrary.SwitchView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"50dp\"\n        app:time=\"500\"//动画时间\n        app:bgColor=\"#FFE0B2\"//背景色\n        app:leftColor=\"#8cc152\"//左边颜色\n        app:rightColor=\"#757575\"//右边颜色\n        app:setChecked=\"true\"//true 是在右边 反之\n        app:textLeft=\"预约车位\"//左边text\n        app:textLeftColor=\"#8cc152\"//左边字的颜色\n        app:textLeftClickColor=\"#757575\"//左边字选中后颜色 默认白\n        app:textRight=\"我有车位\"//同上\n        app:textRightClickColor=\"#FFE0B2\"//同上\n        app:textRightColor=\"#8cc152\" /\u003e//同上\n```\n用法\n```java\ncompile 'com.ld:switchView:1.1.7'\n ```\n \n 点击监听\n```java\n  switchView.setOnClickCheckedListener(new SwitchView.onClickCheckedListener() {\n            @Override\n            public void onClick() {\n                Toast.makeText(MainActivity.this, \"type:\" + switchView.isChecked(), Toast.LENGTH_SHORT).show();\n            }\n        });\n```\n有问题需要 欢迎留言~  \n","funding_links":[],"categories":["SwitchButton"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F799536960%2FswitchView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F799536960%2FswitchView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F799536960%2FswitchView/lists"}