{"id":13428404,"url":"https://github.com/bitvale/Switcher","last_synced_at":"2025-03-16T01:32:24.746Z","repository":{"id":57732626,"uuid":"157774533","full_name":"bitvale/Switcher","owner":"bitvale","description":"Android implementation of switch animation from Oleg Frolov","archived":false,"fork":false,"pushed_at":"2022-01-03T17:24:10.000Z","size":1295,"stargazers_count":1336,"open_issues_count":2,"forks_count":94,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-10T10:47:01.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://android.jlelse.eu/android-dynamic-custom-view-is-easy-433258cbb80f","language":"Kotlin","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/bitvale.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}},"created_at":"2018-11-15T21:23:42.000Z","updated_at":"2025-03-08T05:02:08.000Z","dependencies_parsed_at":"2022-09-12T15:31:20.546Z","dependency_job_id":null,"html_url":"https://github.com/bitvale/Switcher","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FSwitcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FSwitcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FSwitcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FSwitcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitvale","download_url":"https://codeload.github.com/bitvale/Switcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814900,"owners_count":20352037,"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-07-31T01:00:56.087Z","updated_at":"2025-03-16T01:32:24.406Z","avatar_url":"https://github.com/bitvale.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Kotlin"],"sub_categories":[],"readme":"# Switcher\n\n\u003cimg src=\"/art/preview.gif\" alt=\"sample\" title=\"sample\" width=\"260\" height=\"390\" align=\"right\" vspace=\"52\" /\u003e\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-17%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=17)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Switcher-orange.svg?style=flat)](https://android-arsenal.com/details/1/7460)\n\nCreated this cool [switch animation](https://dribbble.com/shots/5429846-Switcher-XLIV) from [Oleg Frolov](https://dribbble.com/Volorf) as an android library. \n\n\u003ca href=\"https://android.jlelse.eu/android-dynamic-custom-view-is-easy-433258cbb80f\"\u003e\n  \u003cimg alt=\"Read on Medium\" src=\"/art/medium.png\" width=\"196\" height=\"80\" hspace=\"15\" /\u003e\n\u003c/a\u003e\n\nAPK\n-----\nInstall the latest [release](https://github.com/bitvale/Switcher/releases/latest)\n\nUSAGE\n-----\n\nJust add Switcher view in your layout XML and Switcher library in your project via Gradle:\n\n```gradle\ndependencies {\n  implementation 'io.github.bitvale:switcher:1.1.2'\n}\n```\n\nXML\n-----\n\n```xml\n\u003ccom.bitvale.switcher.SwitcherX // or SwitcherC\n    android:id=\"@+id/switcher\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:switcher_on_color=\"@color/on_color\"\n    app:switcher_off_color=\"@color/off_color\"\n    app:switcher_icon_color=\"@color/icon_color\" /\u003e\n```\n\nYou must use the following properties in your XML to change your Switcher.\n\n\n##### Properties:\n\n* `android:checked`                 (boolean)   -\u003e default  true\n* `app:switcher_on_color`           (color)     -\u003e default  #48ea8b\n* `app:switcher_off_color`          (color)     -\u003e default  #ff4651\n* `app:switcher_icon_color`         (color)     -\u003e default  white\n* `app:elevation`                   (dimension) -\u003e default  4dp\n\nKotlin\n-----\n\n```kotlin\nswitcher.setOnCheckedChangeListener { checked -\u003e\n    if (checked) action()\n}\n```\n\nLICENCE\n-----\n\nSwitcher by [Alexander Kolpakov](https://play.google.com/store/apps/dev?id=7044571013168957413) is licensed under an [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitvale%2FSwitcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitvale%2FSwitcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitvale%2FSwitcher/lists"}