{"id":21130339,"url":"https://github.com/diogobernardino/CircularCounter","last_synced_at":"2025-07-09T01:33:16.285Z","repository":{"id":16881467,"uuid":"19642003","full_name":"diogobernardino/CircularCounter","owner":"diogobernardino","description":"Android Widget","archived":false,"fork":false,"pushed_at":"2014-08-27T20:52:29.000Z","size":273,"stargazers_count":253,"open_issues_count":2,"forks_count":50,"subscribers_count":16,"default_branch":"master","last_synced_at":"2023-11-07T15:19:14.771Z","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/diogobernardino.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}},"created_at":"2014-05-10T13:26:05.000Z","updated_at":"2023-11-03T05:43:47.000Z","dependencies_parsed_at":"2022-08-25T12:01:07.912Z","dependency_job_id":null,"html_url":"https://github.com/diogobernardino/CircularCounter","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogobernardino%2FCircularCounter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogobernardino%2FCircularCounter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogobernardino%2FCircularCounter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogobernardino%2FCircularCounter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diogobernardino","download_url":"https://codeload.github.com/diogobernardino/CircularCounter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476370,"owners_count":17480215,"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-11-20T05:32:37.656Z","updated_at":"2024-11-20T05:32:45.637Z","avatar_url":"https://github.com/diogobernardino.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"Circular Counter\r\n=============\r\nCircular Counter is an Android Widget I needed to implement for an application I was developing. As it could be useful to more people, I tried to make it generic enough to share and be used by others.\r\n\r\nThe view shows a value in the center together with 3 bars that grow depending on the values received. Digging into the code you can easily increase or decrease the number of bars.\r\n\r\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.db.circularcounterdemo\"\u003e\r\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\r\n\u003c/a\u003e\r\n\r\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-CircularCounter-lightgrey.svg?style=flat)](https://android-arsenal.com/details/1/842)\r\n\r\nScreenshot\r\n----------------\r\n\r\n![Demo Screenshot][1]\r\n\r\n\r\nUsage\r\n--------\r\n\r\nAdd ``CircularCounter`` widget to your layout. Configure the view customization elements using styleable attributes or/and programatically. This is a basic example, explore the code to get to know it in detail.\r\n\r\n```xml\r\n\r\n    \u003ccom.db.circularcounter.CircularCounter\r\n        xmlns:counter=\"http://schemas.android.com/apk/res-auto\"\r\n        android:id=\"@+id/counter\"\r\n        android:layout_width=\"300dp\"\r\n        android:layout_height=\"300dp\"\r\n        counter:range=\"60\"\r\n        counter:textSize=\"100sp\"\r\n        counter:textColor=\"#ffffff\"\r\n        counter:metricSize=\"20sp\"\r\n        counter:metricText=\"metric\"\r\n    /\u003e\r\n\r\n```\r\n\r\n```java\r\n\r\n    //First Bar\r\n    counter.setFirstWidth(getResources().getDimension(R.dimen.first))\r\n    counter.setFirstColor(Color.parseColor(colors[0]))\r\n\r\n    //Second Bar\r\n    counter.setSecondWidth(getResources().getDimension(R.dimen.second))\r\n    counter.setSecondColor(Color.parseColor(colors[1]))\r\n\r\n    //Third Bar\r\n    counter.setThirdWidth(getResources().getDimension(R.dimen.third))\r\n    counter.setThirdColor(Color.parseColor(colors[2]))\r\n            \r\n    counter.setBackgroundColor(Color.parseColor(colors[3]));\r\n\r\n```\r\n\r\nTo pass values to the view use  ``setValues(value1, value2, value3)``. First value will be the one shown in text.\r\n\r\n\r\n[1]: ./screenshot.png","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogobernardino%2FCircularCounter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiogobernardino%2FCircularCounter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogobernardino%2FCircularCounter/lists"}