{"id":13989457,"url":"https://github.com/techery/ProperRatingBar","last_synced_at":"2025-07-22T10:32:31.858Z","repository":{"id":75020345,"uuid":"44236804","full_name":"techery/ProperRatingBar","owner":"techery","description":"Inspired by stock android RatingBar. Simpler, has features that original lacks.","archived":false,"fork":false,"pushed_at":"2017-09-07T01:59:07.000Z","size":490,"stargazers_count":410,"open_issues_count":16,"forks_count":70,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-08-09T13:15:56.309Z","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/techery.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}},"created_at":"2015-10-14T09:12:38.000Z","updated_at":"2024-07-12T03:39:25.000Z","dependencies_parsed_at":"2024-01-15T16:51:33.357Z","dependency_job_id":null,"html_url":"https://github.com/techery/ProperRatingBar","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/techery%2FProperRatingBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FProperRatingBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FProperRatingBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FProperRatingBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techery","download_url":"https://codeload.github.com/techery/ProperRatingBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227079406,"owners_count":17728002,"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-09T13:01:40.033Z","updated_at":"2024-11-29T08:31:28.334Z","avatar_url":"https://github.com/techery.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ProperRatingBar-green.svg?style=flat)](http://android-arsenal.com/details/1/2669)\n\n# ProperRatingBar\nInspired by stock android RatingBar. Simpler, has features that original lacks.\n\n## What is this about\nWhatever you need to display some rating or pricing category - just use ProperRatingBar so this:\n```xml\n\u003cio.techery.properratingbar.ProperRatingBar\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"22sp\"\n        android:textStyle=\"bold\"\n        app:prb_defaultRating=\"4\"\n        app:prb_symbolicTick=\"$\"\n        app:prb_symbolicTickNormalColor=\"@android:color/darker_gray\"\n        app:prb_symbolicTickSelectedColor=\"@android:color/holo_green_dark\"\n        app:prb_totalTicks=\"5\"\n        /\u003e\n```\n\nbecomes this:\n\n![Readme Screenshot 1](https://raw.githubusercontent.com/techery/ProperRatingBar/master/readme_imgs/readme1.png)\n\n## Example\nSee video below for possible usage scenarios.\n\n![Demo Gif](https://raw.githubusercontent.com/techery/ProperRatingBar/master/readme_imgs/ProperRatingBar_v001_demo.gif)\n\n\n## Motivation\nWhy bother and design our own element?\n\nWell, stock Android RatingBar lacks some styling attributes that you would expect from it and sometimes offers unexpected behavior.\n\nBesides that, we needed to use symbols like '$' as rating bar ticks in our project - none of third-patry libraries out there provides that functionality.\n\n## Installation\n\n[![](https://jitpack.io/v/techery/properratingbar.svg)](https://jitpack.io/#techery/properratingbar)\n\nLibrary's minSdkVersion is set to 14.\n\nWe use jitpack, so you can obtain made-up library right from our github sources in your module's `build.gradle` file:\n\n`compile 'com.github.techery:properratingbar:{version_name}'`\n\nAlso you need to add jitpack as repository in the same file:\n```groovy\nrepositories {\n        // ...\n        maven { url \"https://jitpack.io\" }\n    }\n```\n\n## API Reference\nSo far we only support customising via xml layout.\nHere is the list of applicable attributes:\n+ ``prb_totalTicks``: total number of ticks to show. Default is '5'\n+ ``prb_defaultRating``: use this to set rating from xml. Default is '3'\n+ ``prb_clickable``: if set to 'true' - use will be able to change rating by clicking. Default is 'false'\n\n+ ``prb_symbolicTick``: symbol to be used as a tick. Default is '$'\n+ ``android:textSize``: text size of symbolic tick. Default is '15sp'\n+ ``android:textStyle``: text style of symbolic tick. Possible: 'bold', 'italic', 'normal'. Default is 'normal'\n+ ``prb_symbolicTickNormalColor``: color of symbolic tick that is not selected (not rated). Default is '#FF000000' (black)\n+ ``prb_symbolicTickSelectedColor``: color of symbolic tick that is selected (rated). Default is '#FF888888' (gray)\n\n+ ``prb_tickNormalDrawable``: drawable resource to use as a tick that is not selected (not rated). No default value\n+ ``prb_tickSelectedDrawable``: drawable resource to use as a tick that is selected (rated). No default value\n+ ``prb_tickSpacing``: margin to be applied to tick drawables. Only applies to drawable-type ticks. Default is '1dp' (gray)\n\nAlso there's a number of methods to operate on ProperRatingBar programmatically:\n```java\n\npublic boolean isClickable();\n\n/**\n * Nifty sugar method to just toggle clickable to opposite state.\n */\npublic void toggleClickable();\n\npublic void setClickable(boolean clickable);\n\n/**\n* Get the attached {@link RatingListener}\n* @return listener or null if none was set\n*/\n@Nullable\npublic RatingListener getListener();\n\n/**\n* Set the {@link RatingListener} to be called when user taps rating bar's ticks\n* @param listener listener to set\n*/\npublic void setListener(RatingListener listener);\n\n/**\n* Remove listener\n*/\npublic void removeRatingListener();\n\n/**\n* Get the current rating shown\n* @return rating\n*/\npublic int getRating();\n\n/**\n* Set the rating to show\n* @param rating new rating value\n*/\npublic void setRating(int rating);\n```\n\n## Tests\n\nNo test coverage is supplied so far - might be added later.\n\n## Versions\n\nActual version can be found [here](https://github.com/techery/ProperRatingBar/releases/latest)\n\nBe warned that given code is likely to be refactored and partly re-done (including possible API changes with no backward-compatibility).\n\n## Contribution\n\nPR's are welcome. Just follow the general code style (both xml and java).\n\nProper code style setup might be added later and included to repository.\n\n## License\n\n    The MIT License (MIT)\n\n    Copyright (c) 2016 Techery (http://techery.io/)\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2FProperRatingBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechery%2FProperRatingBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2FProperRatingBar/lists"}