{"id":28490259,"url":"https://github.com/jeanboydev/android-wheelfortune","last_synced_at":"2025-07-01T17:30:38.235Z","repository":{"id":37212231,"uuid":"331534862","full_name":"jeanboydev/Android-WheelFortune","owner":"jeanboydev","description":"🤡幸运抽奖转盘，类似于StarMaker直播间抽奖。","archived":false,"fork":false,"pushed_at":"2021-02-22T11:25:54.000Z","size":8764,"stargazers_count":65,"open_issues_count":1,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T07:08:11.547Z","etag":null,"topics":["fortune","wheel"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/jeanboydev.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":"2021-01-21T06:23:04.000Z","updated_at":"2025-06-01T06:08:54.000Z","dependencies_parsed_at":"2022-09-04T07:01:13.993Z","dependency_job_id":null,"html_url":"https://github.com/jeanboydev/Android-WheelFortune","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeanboydev/Android-WheelFortune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanboydev%2FAndroid-WheelFortune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanboydev%2FAndroid-WheelFortune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanboydev%2FAndroid-WheelFortune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanboydev%2FAndroid-WheelFortune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeanboydev","download_url":"https://codeload.github.com/jeanboydev/Android-WheelFortune/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanboydev%2FAndroid-WheelFortune/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263007003,"owners_count":23398742,"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":["fortune","wheel"],"created_at":"2025-06-08T07:08:06.694Z","updated_at":"2025-07-01T17:30:38.228Z","avatar_url":"https://github.com/jeanboydev.png","language":"Kotlin","readme":"# WheelFortune\n\n幸运抽奖转盘，类似于StarMaker直播间抽奖。\n\n## 效果图\n\n![效果图1](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/01.jpeg)\n![效果图2](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/02.jpeg)\n![效果图3](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/03.jpeg)\n![效果图4](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/04.jpeg)\n\n![效果图5](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/00.gif)\n[点击查看效果视频](https://raw.githubusercontent.com/jeanboydev/Android-WheelFortune/main/resources/00.mp4)\n\n## 使用\n\n- 设置布局\n\n```xml\n\u003ccom.jeanboy.component.wheelfortune.WheelFortuneView\n\tandroid:id=\"@+id/wheelFortuneView\"\n  android:layout_width=\"320dp\"\n  android:layout_height=\"320dp\"\n  android:layout_gravity=\"center\" /\u003e\n```\n\n- 处理回调\n\n```kotlin\nval wheelFortuneView = findViewById(R.id.wheelFortuneView)\ntv_user_count = findViewById(R.id.tv_user_count)\n\nwheelFortuneView?.setListener(object : WheelFortuneView.WheelStateListener {\n  override fun onJoinClick() {\n    // join 按钮点击时回调，移除 item\n    wheelFortuneView?.toRunning(0)\n  }\n\n  override fun onCountChange(count: Int) {\n    // item 数量变化回调\n    tv_user_count?.text = resources.getString(R.string.user_count, count, dataList.size)\n  }\n\n  override fun onRemove(removeData: ItemData) {\n\t\t// item 移除时回调\n  }\n})\n```\n\n- 处理数据\n\n```kotlin\n// 添加数据\nwheelFortuneView?.addData(dataList[index])\n\n// 清除数据\nwheelFortuneView?.clearData()\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanboydev%2Fandroid-wheelfortune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeanboydev%2Fandroid-wheelfortune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanboydev%2Fandroid-wheelfortune/lists"}