{"id":13644170,"url":"https://github.com/nex3z/NotificationBadge","last_synced_at":"2025-04-21T06:33:16.834Z","repository":{"id":57728163,"uuid":"75838237","full_name":"nex3z/NotificationBadge","owner":"nex3z","description":"A notification badge with animation.","archived":false,"fork":false,"pushed_at":"2021-02-07T16:17:29.000Z","size":640,"stargazers_count":324,"open_issues_count":0,"forks_count":58,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-04T12:07:10.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nex3z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-07T13:25:25.000Z","updated_at":"2025-03-22T23:14:25.000Z","dependencies_parsed_at":"2022-08-30T09:11:24.475Z","dependency_job_id":null,"html_url":"https://github.com/nex3z/NotificationBadge","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nex3z%2FNotificationBadge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nex3z%2FNotificationBadge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nex3z%2FNotificationBadge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nex3z%2FNotificationBadge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nex3z","download_url":"https://codeload.github.com/nex3z/NotificationBadge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250008338,"owners_count":21359968,"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:58.521Z","updated_at":"2025-04-21T06:33:13.557Z","avatar_url":"https://github.com/nex3z.png","language":"Kotlin","funding_links":[],"categories":["徽章(Badge)"],"sub_categories":[],"readme":"# NotificationBadge\n\nA notification badge with animation.\n\n![sample](images/sample.gif)\n\n\n## Gradle\n\n```\nimplementation 'com.nex3z:notification-badge:1.0.4'\n```\n\n\n## Usage\n\n```xml\n\u003ccom.nex3z.notificationbadge.NotificationBadge\n    android:id=\"@+id/badge\"\n    android:layout_width=\"28dp\"\n    android:layout_height=\"28dp\"\n    app:nbMaxTextLength=\"2\"/\u003e\n```\n\nUse `setNumber(int number)` or `setText(String text)` to add number or arbitrary text on the badge. Use `clear()` to clear the badge.\n\n\n## Attributes\n\n| Attribute           | Format    | Description                                                                                                |\n|---------------------|-----------|------------------------------------------------------------------------------------------------------------|\n| textSize            | dimension | Text size.                                                                                                 |\n| textColor           | color     | Text color.                                                                                                |\n| nbBackground        | reference | Badge background image.                                                                                    |\n| nbAnimationEnabled  | boolean   | `true` to enable animation, `false`to disable it. The default is `true`.                                   |\n| nbAnimationDuration | integer   | Duration of the animation in milliseconds. The default is `500` milliseconds.                              |\n| nbMaxTextLength     | integer   | Max text length allowed to show on the badge. The default is `2`.                                          |\n| nbEllipsizeText     | string    | Special text to show when the length of the original text reaches `nbMaxTextLength`. The default is `...`. |\n\n## Licence\n\n```\nCopyright 2016 nex3z\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnex3z%2FNotificationBadge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnex3z%2FNotificationBadge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnex3z%2FNotificationBadge/lists"}