{"id":13644146,"url":"https://github.com/bingoogolapple/BGABadgeView-Android","last_synced_at":"2025-04-21T06:33:02.701Z","repository":{"id":34689085,"uuid":"38663551","full_name":"bingoogolapple/BGABadgeView-Android","owner":"bingoogolapple","description":"Android 徽章控件","archived":false,"fork":false,"pushed_at":"2024-12-10T15:37:42.000Z","size":1354,"stargazers_count":2652,"open_issues_count":29,"forks_count":433,"subscribers_count":73,"default_branch":"master","last_synced_at":"2025-04-06T14:01:16.109Z","etag":null,"topics":["badge","badgeview"],"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/bingoogolapple.png","metadata":{"files":{"readme":"README-en.md","changelog":"CHANGELOG.md","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":"2015-07-07T04:13:57.000Z","updated_at":"2025-03-23T15:16:04.000Z","dependencies_parsed_at":"2024-12-21T20:01:03.143Z","dependency_job_id":"4a29705b-8586-4da5-84a3-25e214174505","html_url":"https://github.com/bingoogolapple/BGABadgeView-Android","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"eccbfa5d7a86ba4423a30984aa95597480cf8dcc"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingoogolapple%2FBGABadgeView-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingoogolapple%2FBGABadgeView-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingoogolapple%2FBGABadgeView-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingoogolapple%2FBGABadgeView-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bingoogolapple","download_url":"https://codeload.github.com/bingoogolapple/BGABadgeView-Android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248747580,"owners_count":21155477,"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":["badge","badgeview"],"created_at":"2024-08-02T01:01:58.116Z","updated_at":"2025-04-21T06:33:02.663Z","avatar_url":"https://github.com/bingoogolapple.png","language":"Java","funding_links":[],"categories":["徽章(Badge)","Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":":heartpulse:BGABadgeView-Android:heartpulse:\n============\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-BGABadgeView-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2106)\n[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Download](https://jitpack.io/v/bingoogolapple/BGABadgeView-Android.svg)](https://jitpack.io/#bingoogolapple/BGABadgeView-Android)\n\n### [中文文档](https://github.com/bingoogolapple/BGABadgeView-Android/blob/master/README.md)\n\n### [react-native-bga-badge-view](https://github.com/bingoogolapple/react-native-bga-badge-view)\n\n**The demo shows:**\n* The latest message number of weibo at the bottom tab\n* The VIP badge located in lower-right Corner of User’s Photo in the weibo user list\n* The new message in the weixin message page\n* The subscribe message in the weixin message page\n* User’s  round corner photo made by RoundedBitmapDrawable from v4 package\n* Delete badge by drag and drop\n\n### The realization of explosion effect refers to [ExplosionField](https://github.com/tyrantgit/ExplosionField) with the modify of only retaining one View，and only refresh the field around of badge\n\n### Screenshots\n![badgeview](https://cloud.githubusercontent.com/assets/8949716/17483429/8f5ab3aa-5db8-11e6-808c-6033f5d5c4ec.gif)\n\n### Gradle Dependencies\n\n[![Download](https://jitpack.io/v/bingoogolapple/BGABadgeView-Android.svg)](https://jitpack.io/#bingoogolapple/BGABadgeView-Android)\n\n```groovy\ndependencies {\n    implementation 'com.github.bingoogolapple.BGABadgeView-Android:api:latestVersion'\n    annotationProcessor 'com.github.bingoogolapple.BGABadgeView-Android:compiler:latestVersion'\n}\n```\n\n### Initialize BGABadge\n\nAdd BGABadge annotation to any class, such as newly created class BGABadgeInit\n\n```Java\n@BGABadge({\n        View.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeView，If you do not need, please delete this line\n        ImageView.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeImageView，If you do not need, please delete this line\n        TextView.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeFloatingTextView，If you do not need, please delete this line\n        RadioButton.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeRadioButton，If you do not need, please delete this line\n        LinearLayout.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeLinearLayout，If you do not need, please delete this line\n        RelativeLayout.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeRelativeLayout，If you do not need, please delete this line\n        FloatingActionButton.class, // ===\u003e cn.bingoogolapple.badgeview.BGABadgeFloatingActionButton，If you do not need, please delete this line\n        ...\n        ...\n        ...\n})\npublic class BGABadgeInit {\n}\n```\n\n\n### Supported badge style for now\n\nClass name | usage scenario\n:----------- | :-----------\nBGABadgeRadioButton | Bottom navigation of weibo home page\nBGABadgeImageView | User’s photo of weibo user list\nBGABadgeTextView | You can alternatively use  BGABadgeCheckedTextView\nBGABadgeLinearLayout | Message number in the right of item in the list\nBGABadgeRelativeLayout | Message number in the right of item in the list\nBGABadgeFrameLayout | Message number in the right of item in the list\n\n### Interface/api explain\n\n```java\n/**\n * show circle badge\n */\nvoid showCirclePointBadge();\n\n/**\n * show text badge\n *\n * @param badgeText\n */\nvoid showTextBadge(String badgeText);\n\n/**\n * hide badge\n */\nvoid hiddenBadge();\n\n/**\n * show image badge\n *\n * @param bitmap\n */\nvoid showDrawableBadge(Bitmap bitmap);\n\n/**\n * set the delegate to delete the badge by drag and drop\n *\n * @param delegate\n */\nvoid setDragDismissDelegage(BGADragDismissDelegate delegate);\n\n/**\n * Whether show the badge or not\n *\n * @return\n */\nboolean isShowBadge();\n\n/**\n * Can it be dragged\n *\n * @return\n */\nboolean isDraggable();\n\n/**\n * Whether being dragged\n *\n * @return\n */\nboolean isDragging();\n```\n\n### The customed attribution\n\nThe customed attribution | Explain | Default value\n:----------- | :----------- | :-----------\nbadge_bgColor         | Badge background        | Color.RED\nbadge_textColor         | Text color of badge        | Color.WHITE\nbadge_textSize         | Text font size of badge        | 10sp\nbadge_verticalMargin         | The distance in pixels from the top edge of badge’s background to the top edge of the host or from the bottom edge of badge’s bottom to the host’s bottom        | 4dp\nbadge_horizontalMargin         | The distance in pixels from the edge of badge’s background to the left or right edge of the host        | 4dp\nbadge_padding         | Badge’s padding        | 4dp\nbadge_gravity         | Badge’s gravity, it’s layout direction        | For BGABadgeImageView and BGABadgeRadioButton, upper right.For others, the default is the right side of the vertical center\nbadge_draggable         | The badge can be drag or not        | false\nbadge_isResumeTravel         | When the badge is dragged out of path, if it can resume the path in case of put back        | false\nbadge_borderWidth         | Border width of badge        | 0dp\nbadge_borderColor         | Border color of badge        | Color.WHITE\nbadge_dragExtra         | Extra distance of trigger drag event        | 4dp\n\n### About me\n\n| Personal homepage | email |  QQ for the BGA funs |\n| ------------- | ------------ | ------------ |\n| \u003ca href=\"http://www.bingoogolapple.cn\" target=\"_blank\"\u003ebingoogolapple.cn\u003c/a\u003e | \u003ca href=\"mailto:bingoogolapple@gmail.com\" target=\"_blank\"\u003ebingoogolapple@gmail.com\u003c/a\u003e | ![BGA_CODE_CLUB](http://7xk9dj.com1.z0.glb.clouddn.com/BGA_CODE_CLUB.png?imageView2/2/w/200) |\n\n## Donate\n\nIt takes much time and energy to maintain and improve this project. It BGA helps you, you may want to buy me a coffee :).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://7xk9dj.com1.z0.glb.clouddn.com/bga_pay.png\" width=\"450\"\u003e\n\u003c/p\u003e\n\n## License\n\n    Copyright 2015 bingoogolapple\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingoogolapple%2FBGABadgeView-Android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbingoogolapple%2FBGABadgeView-Android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingoogolapple%2FBGABadgeView-Android/lists"}