{"id":29264140,"url":"https://github.com/mmj-dev-git/toogleswitch","last_synced_at":"2025-07-04T12:10:19.859Z","repository":{"id":199710122,"uuid":"343690421","full_name":"mmj-dev-git/ToogleSwitch","owner":"mmj-dev-git","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-02T07:57:22.000Z","size":464,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T11:55:00.191Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmj-dev-git.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}},"created_at":"2021-03-02T07:56:19.000Z","updated_at":"2022-07-29T19:27:31.000Z","dependencies_parsed_at":"2023-10-11T21:48:14.516Z","dependency_job_id":"b7e15c93-eb87-45fd-a507-e74aac99f391","html_url":"https://github.com/mmj-dev-git/ToogleSwitch","commit_stats":null,"previous_names":["m-jayy/toogleswitch","mmj-dev-git/toogleswitch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmj-dev-git/ToogleSwitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmj-dev-git%2FToogleSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmj-dev-git%2FToogleSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmj-dev-git%2FToogleSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmj-dev-git%2FToogleSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmj-dev-git","download_url":"https://codeload.github.com/mmj-dev-git/ToogleSwitch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmj-dev-git%2FToogleSwitch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263510301,"owners_count":23477408,"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":"2025-07-04T12:10:14.316Z","updated_at":"2025-07-04T12:10:19.853Z","avatar_url":"https://github.com/mmj-dev-git.png","language":"Java","readme":"# ToggleSwitchButton\n\nThis project aims to provide a working dual toggle button implementation. \n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ToggleSwitchButton-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2439)\n\n![Preview](https://github.com/Aenterhy/ToggleSwitch/blob/master/media/demo.gif)\n#Usage\n\n*For a working implementation, Have a look at the Sample Project - app*\n\n1. Include the library as local library project:\n\n\t``` groovy\n\tcompile 'co.aenterhy:toggleswitch:1.0.0'\n\t```\n\n2. Add view to your layout file: \n\t``` xml\n\t\u003c!-- ... --\u003e\n\n    \u003cco.aenterhy.toggleswitch.ToggleSwitchButton\n        android:id=\"@+id/toggle\"\n        style=\"@style/ToggleSwitchButton\" /\u003e\n\n\t\u003c!-- ... --\u003e\n\t```\n\n3. Add to your ```styles.xml```: \n\t``` xml\n\n    \u003cstyle name=\"ToggleSwitchButton\"\u003e\n        \u003citem name=\"android:layout_width\"\u003ewrap_content\u003c/item\u003e\n        \u003citem name=\"android:layout_height\"\u003ewrap_content\u003c/item\u003e\n        \u003citem name=\"android:layout_alignParentBottom\"\u003etrue\u003c/item\u003e\n        \u003citem name=\"android:layout_alignParentRight\"\u003etrue\u003c/item\u003e\n        \u003citem name=\"outerRadius\"\u003e50dp\u003c/item\u003e\n        \u003citem name=\"handleDrawable\"\u003e@drawable/ic_switch\u003c/item\u003e\n        \u003citem name=\"upper\"\u003e@drawable/ic_camera\u003c/item\u003e\n        \u003citem name=\"bottom\"\u003e@drawable/ic_audio\u003c/item\u003e\n    \u003c/style\u003e\n\t```\n\n4. Add component handler into your activity or fragment: \n\n\t``` java\n        toggle = (ToggleSwitchButton) findViewById(R.id.toggle);\n        toggle.setOnTriggerListener(new ToggleSwitchButton.OnTriggerListener() {\n            @Override\n            public void toggledUp() {\n                Toast.makeText(MainActivity.this, \"Camera\", Toast.LENGTH_SHORT).show();\n            }\n\n            @Override\n            public void toggledDown() {\n                Toast.makeText(MainActivity.this, \"Audio\", Toast.LENGTH_SHORT).show();\n            }\n        });\n\t```\n\nMore options will be added soon :)\n\n#Compatibility\n\n  * Android 4.0+\n\n# Changelog\n\n### Version: 1.0\n\n  * Initial Build\n\n## License\n\n    Copyright 2015, Roman Herasymenko\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmj-dev-git%2Ftoogleswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmj-dev-git%2Ftoogleswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmj-dev-git%2Ftoogleswitch/lists"}