{"id":17996302,"url":"https://github.com/razerdp/praisewidget","last_synced_at":"2025-07-31T08:34:59.515Z","repository":{"id":152927053,"uuid":"46602226","full_name":"razerdp/PraiseWidget","owner":"razerdp","description":"// 这个是点赞控件哦","archived":false,"fork":false,"pushed_at":"2017-10-18T03:42:37.000Z","size":1988,"stargazers_count":53,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T22:05:17.839Z","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/razerdp.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}},"created_at":"2015-11-21T05:12:57.000Z","updated_at":"2023-04-13T11:39:22.000Z","dependencies_parsed_at":"2024-02-01T15:28:07.806Z","dependency_job_id":"9baf1836-ce82-42f5-9541-2e238cd84d36","html_url":"https://github.com/razerdp/PraiseWidget","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/razerdp/PraiseWidget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FPraiseWidget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FPraiseWidget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FPraiseWidget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FPraiseWidget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razerdp","download_url":"https://codeload.github.com/razerdp/PraiseWidget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FPraiseWidget/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268012373,"owners_count":24180972,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-29T21:14:13.154Z","updated_at":"2025-07-31T08:34:59.488Z","avatar_url":"https://github.com/razerdp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PraiseWidget\n// 这个是点赞控件哦，适用于社交类app\u003c/br\u003e\n### 实际效果可以看看我在[朋友圈项目](https://github.com/razerdp/FriendCircle)的使用\n\n实现流程：http://blog.csdn.net/mkfrank/article/details/49963779\n\u003c/br\u003e\n## 效果图：\u003c/br\u003e\n![image](https://github.com/razerdp/PraiseWidget/blob/master/img/praise%20widget.gif)\n## 使用方法：\u003c/br\u003e\n在xml定义控件，findViewById后，使用setDataByArray传入数据（本例子用的是PraiseBean），您可以改成你需要用的\u003c/br\u003e\n正因为如此，我并没有抽取为一个Library\u003c/br\u003e\n如果需要跟显示图一样超过5行就显示“等xx人”，**请跟TextView一样给定android:maxLines=\"5\"**\n\u003c/br\u003e\n## 可定义的属性：(attrs.xml)\u003c/br\u003e\n```html\n     \u003c!--显示点赞控件--\u003e\n      \u003cdeclare-styleable name=\"PraiseWidget\"\u003e\n          \u003cattr name=\"click_bg_color\" format=\"color\"/\u003e //点击的背景色，默认全透明\n          \u003cattr name=\"font_color\" format=\"color\"/\u003e  //文字颜色，默认蓝\n          \u003cattr name=\"font_size\" format=\"dimension\"/\u003e  //文字大小，默认16sp\n          \u003cattr name=\"zan_icon\" format=\"reference\"/\u003e  //第一个点赞的图标，默认一个蓝色的心心\n      \u003c/declare-styleable\u003e\n```\n## 注意事项：\u003c/br\u003e\n因为使用了缓存，所以如果在activity引用了，请务必在onDestroy里面调用PraiseWidget.clearPraiseWidgetCache清掉context引用，避免无法回收\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazerdp%2Fpraisewidget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazerdp%2Fpraisewidget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazerdp%2Fpraisewidget/lists"}