{"id":19521832,"url":"https://github.com/smarttoolfactory/badgetextview","last_synced_at":"2025-04-26T09:32:00.546Z","repository":{"id":109486426,"uuid":"338788534","full_name":"SmartToolFactory/BadgeTextView","owner":"SmartToolFactory","description":"✅✏️📌 Badge TextView for Android to draw numbers on a TextView which is customizable and scalable. Displays numbers either as circle or rounded rectangle depending on badge count and selected threshold to transform from circle to rounded rectangle.","archived":false,"fork":false,"pushed_at":"2021-11-13T19:17:27.000Z","size":3132,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T10:28:21.178Z","etag":null,"topics":["android","badge-textview","badgeview","custom-view"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/SmartToolFactory.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,"publiccode":null,"codemeta":null}},"created_at":"2021-02-14T11:21:15.000Z","updated_at":"2024-12-03T10:42:04.000Z","dependencies_parsed_at":"2023-05-15T14:00:43.966Z","dependency_job_id":null,"html_url":"https://github.com/SmartToolFactory/BadgeTextView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FBadgeTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FBadgeTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FBadgeTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FBadgeTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmartToolFactory","download_url":"https://codeload.github.com/SmartToolFactory/BadgeTextView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250967145,"owners_count":21515546,"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":["android","badge-textview","badgeview","custom-view"],"created_at":"2024-11-11T00:35:17.206Z","updated_at":"2025-04-26T09:32:00.539Z","avatar_url":"https://github.com/SmartToolFactory.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Badge TextView\n\n\nBadge TextView for Android that like the draws number on a badge which can be customizable and\nscalable by almost retaining it's same shape. It displays numbers either as circle or rounded\nrectangle depending on badge count and selected threshold to transform from circle to rounded\nrectangle\n\n| Default | Debug   | Increment |\n| ----------|----------------| --------|\n| \u003cimg src=\"./screenshots/img1.png\" width=\"320\"/\u003e | \u003cimg src=\"./screenshots/img2.png\" width=\"320\"/\u003e | \u003cimg src=\"./screenshots/counter.gif\"/\u003e |\n\n\u003ch2\u003eCustomizable features\u003c/h2\u003e\n\n* Set threshold **badge_circle_threshold** to change shape from circle to rounded shape. For better\n  results select between 1 and 2\n\n* Set maximum number **badge_max_number**. After this number it's displayed with +. For instance if\n  you set maximum number to 99, after 99 it looks as **99+**\n\n* Set radius ratio **badge_round_corner_ratio** for rounded rectangle, it's .5f by default change it\n  to any number between 1 and 0\n\n\n### Shadow\n\n* Set shadow by setting **badge_shadow_radius** to any number greater than 0\n* Change shadow color with **badge_shadow_color**\n* Change shadow x and/or y offset with **badge_shadow_offset_x**, **badge_shadow_offset_y**\n\n### Border\n\n* Set border by setting **badge_border_width** to any number greater than 0\n* Set border color with **badge_border_color**\n\nIf you wish to change drawable area at top and right of the view\n```verticalSpaceAroundText = (textHeight * .12f + 6 + paddingVertical).toInt()``` as you wish\n\nTo change horizontal area set\n``` horizontalSpaceAroundText = ((textHeight * .24f) + 8 + paddingHorizontal).toInt()```\nany function in **onMeasure**\n\n### TODOs:\n- [ ] Add Compose style Scope and Modifier to set properties using these interfaces\n- [ ] Add pin mode to display smaller circle with no text as WhatsApp status notification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarttoolfactory%2Fbadgetextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmarttoolfactory%2Fbadgetextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarttoolfactory%2Fbadgetextview/lists"}