{"id":22612354,"url":"https://github.com/utsavdotpro/advanceswitch","last_synced_at":"2026-05-03T06:40:18.554Z","repository":{"id":115297441,"uuid":"336516790","full_name":"utsavdotpro/AdvanceSwitch","owner":"utsavdotpro","description":"An Android Switch widget with advance click and change handling.","archived":false,"fork":false,"pushed_at":"2021-02-06T12:01:06.000Z","size":402,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T23:46:13.819Z","etag":null,"topics":["android","android-library","android-switch","java","ui-component"],"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/utsavdotpro.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":"2021-02-06T11:00:22.000Z","updated_at":"2022-01-31T21:08:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c4f145e-503c-4e53-80c1-7a2f4510a4da","html_url":"https://github.com/utsavdotpro/AdvanceSwitch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/utsavdotpro/AdvanceSwitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utsavdotpro%2FAdvanceSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utsavdotpro%2FAdvanceSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utsavdotpro%2FAdvanceSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utsavdotpro%2FAdvanceSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utsavdotpro","download_url":"https://codeload.github.com/utsavdotpro/AdvanceSwitch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utsavdotpro%2FAdvanceSwitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32560912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","android-library","android-switch","java","ui-component"],"created_at":"2024-12-08T17:12:24.721Z","updated_at":"2026-05-03T06:40:18.549Z","avatar_url":"https://github.com/utsavdotpro.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/u-barnwal/AdvanceSwitch.svg)](https://jitpack.io/#u-barnwal/AdvanceSwitch)\n# AdvanceSwitch\n\nAn Android Switch widget based on AndroidX SwitchCompact with advance click and change handling.\n\n## Sample\n\u003cimg  src=\"./samples/preview1.gif\"  height=\"400\"\u003e\n\n## Implementation\n**Step 1:** Add to project level build.gradle\n\n    allprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n\n**Step 2:** Add to app level build.gradle\n\n\tdependencies {\n\t    implementation 'com.github.u-barnwal:AdvanceSwitch:VERSION'\n\t}\n## How to use\n**Step 1:** Create view\n\n    \u003ccom.isolpro.library.advanceswitch.AdvanceSwitch\n      android:id=\"@+id/switchMain\"\n      android:layout_width=\"wrap_content\"\n      android:layout_height=\"wrap_content\" /\u003e\n    \n**Step 2:** Add change listener\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t    ...\n\n\t    AdvanceSwitch switchMain = findViewById(R.id.switchMain);\n\t    \n\t    switchMain.setOnCheckedChangeListener((buttonView, isChecked) -\u003e {\n          Toast.makeText(this, \"Listened to change!\", Toast.LENGTH_SHORT).show();\n        });\n\t}\n\n**Changing checked without triggering listener**\n\n    switchMain.setCheckedManually(true); // check \n    switchMain.setCheckedManually(false); // uncheck \n    switchMain.toggleManually(); // toggle \n\n**Changing checked while triggering listener**\n\n    switchMain.setChecked(true); // check \n    switchMain.setChecked(false); // uncheck \n    switchMain.toggle(); // toggle \n\n## Features\n\n - Used just like default Switch widget\n - Doesn't reserve the view tag (setTag() or getTag() are not being used).\n - Easy to use\n - Light weight\n\n## Links\n - Live example: https://transactionslistlite.isolpro.in\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futsavdotpro%2Fadvanceswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futsavdotpro%2Fadvanceswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futsavdotpro%2Fadvanceswitch/lists"}