{"id":13639375,"url":"https://github.com/7heaven/SHSwitchView","last_synced_at":"2025-04-19T22:32:27.312Z","repository":{"id":28689747,"uuid":"32209829","full_name":"7heaven/SHSwitchView","owner":"7heaven","description":"an iOS-7 Style Switch for android","archived":false,"fork":false,"pushed_at":"2017-04-17T01:54:57.000Z","size":554,"stargazers_count":367,"open_issues_count":1,"forks_count":101,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-08-03T01:14:43.328Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/7heaven.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}},"created_at":"2015-03-14T12:11:51.000Z","updated_at":"2024-06-07T02:07:55.000Z","dependencies_parsed_at":"2022-08-29T00:02:25.756Z","dependency_job_id":null,"html_url":"https://github.com/7heaven/SHSwitchView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7heaven%2FSHSwitchView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7heaven%2FSHSwitchView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7heaven%2FSHSwitchView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7heaven%2FSHSwitchView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7heaven","download_url":"https://codeload.github.com/7heaven/SHSwitchView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223810384,"owners_count":17206756,"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.002Z","updated_at":"2024-11-09T09:30:55.907Z","avatar_url":"https://github.com/7heaven.png","language":"Java","readme":"[ ![Download](https://api.bintray.com/packages/7heaven/maven/iosswitch/images/download.svg) ](https://bintray.com/7heaven/maven/iosswitch/_latestVersion)\n[![Build Status](http://img.shields.io/travis/7heaven/SHSwitchView.svg)](https://travis-ci.org/7heaven/SHSwitchView)\n[![License](http://img.shields.io/:license-mit-blue.svg)](LICENSE)\n\n\n## IOS7 风格的Switch开关  \n### IOS7 Style Switch Widget\n*****\n\n\n\n![art1](./arts/art1.gif)\n\n![art3](./arts/art3.gif)\n\n![art4](./arts/art4.gif)\n\n![art5](./arts/art5.gif)\n\n\n\n\n\n## 添加到你的项目中\n### add to your project\n*****\n\n在gradle脚本的dependencies中加入\n\nadd follow line to your dependencies in gradle script\n\n```\ncompile 'com.7heaven.ioswidget:iosswitch:0.6'\n```\n\n\n\n## 使用\n### usage\n*****\n\n```\n\n通过setOn(boolean on)方法设置switch状态,setOn(boolean on, boolean animated)的animated参数决定是否以动画方式切换switch状态\n\nusing setOn(boolean on) method to set switch state,pass animated to setOn(boolean on, boolean animated) to switch state animated or not\n\n```\n\n```\n通过isOn()获取switch状态\n\nusing isOn() method to get switch state\n```\n\n```\n通过setOnSwitchStateChangeListener方法增加状态改变回调\n\nusing setOnSwitchStateChangeListener method to add a callback for switch state change\n\n```\n\n\n\n可在xml文件内通过tintColor标签改变颜色\n\nchange tint color using attribute show as follow\n\n![art2](./arts/art2.png)\n\n","funding_links":[],"categories":["SwitchButton"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7heaven%2FSHSwitchView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7heaven%2FSHSwitchView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7heaven%2FSHSwitchView/lists"}