{"id":13644197,"url":"https://github.com/williamyyu/SimpleRatingBar","last_synced_at":"2025-04-21T07:30:27.674Z","repository":{"id":41575421,"uuid":"90695398","full_name":"williamyyu/SimpleRatingBar","owner":"williamyyu","description":"A simple RatingBar that you can easier to customize image and animations","archived":false,"fork":false,"pushed_at":"2020-12-14T10:49:17.000Z","size":2373,"stargazers_count":1365,"open_issues_count":13,"forks_count":153,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-29T22:32:36.725Z","etag":null,"topics":["android","animate","animation","rating","ratingbar"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamyyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-09T02:50:40.000Z","updated_at":"2024-10-16T06:10:27.000Z","dependencies_parsed_at":"2022-08-20T14:10:59.027Z","dependency_job_id":null,"html_url":"https://github.com/williamyyu/SimpleRatingBar","commit_stats":null,"previous_names":["ome450901/simpleratingbar"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyyu%2FSimpleRatingBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyyu%2FSimpleRatingBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyyu%2FSimpleRatingBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyyu%2FSimpleRatingBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamyyu","download_url":"https://codeload.github.com/williamyyu/SimpleRatingBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014525,"owners_count":21360967,"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","animate","animation","rating","ratingbar"],"created_at":"2024-08-02T01:01:58.920Z","updated_at":"2025-04-21T07:30:26.796Z","avatar_url":"https://github.com/williamyyu.png","language":"Java","readme":"# SimpleRatingBar\n[![JitPack](https://jitpack.io/v/ome450901/SimpleRatingBar.svg)](https://jitpack.io/#ome450901/SimpleRatingBar)\n\n\u003eThe simplest RatingBar library, create your own animate RatingBar in a few steps!\n\nProvide three RatingBars at the moment:\n- BaseRatingBar  \n    A RatingBar without any animation.\n- ScaleRatingBar  \n    A RatingBar with progressive and scale animation.\n- RotationRatingBar (contributed by [nappannda](https://github.com/nappannda))  \n    A RatingBar with progressive and rotate animation.\n    \n## What's Next?\n- Release the Kotlin version of the library!\n- Feel free to post any suggestions you would like to improve!\n\n## Demo\n![](images/demo.gif)  \n![](images/screenshot.png)  \nIcon made by [Freepik](http://www.freepik.com/) from www.flaticon.com \n\n## What's New (v1.5.1)\n- Fixed stepSize bug (#91)\n- Fixed the match parent issue(start didn't consume the whole width)\n\n## Feature\n- Allow half star through click event. (contributed by [ANPez](https://github.com/ANPez))\n- Support step size setting(range from 0.1 to 1.0).\n- Support float rating  \n    - Now you can set a float rating like 3.5, 2.3, 4.7, etc., but you only need to provide two images: `filled` and `empty`, and Library will auto processes your images to support float showing!\n- Stars width and height setting. (contributed by [zhangruize](https://github.com/zhangruize))  \n- Support use touch to change rating\n- Custom drawable's padding\n- Custom your empty and filled drawable\n- Click again to clear rating\n- IsIndicator, Scrollable, Touchable and Clickable settings\n- Rotate animation\n- Scale animation\n\n## How To Use\n### Install\nfrom JitPack:\n\n```gradle\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n\ndependencies {\n    compile 'com.github.ome450901:SimpleRatingBar:LATEST_VERSION'\n}\n```\n\n\n### In Xml\n```xml\n\u003ccom.willy.ratingbar.ScaleRatingBar\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        android:id=\"@+id/simpleRatingBar\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:srb_numStars=\"3\"\n        app:srb_minimumStars=\"1\"\n        app:srb_rating=\"2\"\n        app:srb_starWidth=\"30dp\"\n        app:srb_starHeight=\"30dp\"\n        app:srb_starPadding=\"15dp\"\n        app:srb_stepSize=\"0.5\"\n        app:srb_isIndicator=\"false\"\n        app:srb_clickable=\"true\"\n        app:srb_scrollable=\"true\"\n        app:srb_clearRatingEnabled=\"true\"\n        app:srb_drawableEmpty=\"@drawable/start_empty\"\n        app:srb_drawableFilled=\"@drawable/star_filled\"\u003e\n\u003c/com.willy.ratingbar.ScaleRatingBar\u003e\n```\n\n### In Your Code\n```java\nScaleRatingBar ratingBar = new ScaleRatingBar(this);\nratingBar.setNumStars(5);\nratingBar.setMinimumStars(1);\nratingBar.setRating(3);\nratingBar.setStarPadding(10);\nratingBar.setStepSize(0.5f);\nratingBar.setWidth(105);\nratingBar.setHeight(105);\nratingbar.setIsIndicator(false);\nratingbar.setClickable(true);\nratingbar.setScrollable(true);\nratingbar.setClearRatingEnabled(true);\nratingBar.setEmptyDrawableRes(R.drawable.start_empty);\nratingBar.setFilledDrawableRes(R.drawable.start_empty);\nratingBar.setOnRatingChangeListener(new BaseRatingBar.OnRatingChangeListener() {\n    @Override\n        public void onRatingChange(BaseRatingBar ratingBar, int rating, boolean fromUser) {\n            Log.e(TAG, \"onRatingChange: \" + rating);\n    }\n});\n```\n\n## Want to Implement Your Own Animation?\n#### Only TWO STEPS you need to do:\n- Create a class that extend `BaseRatingBar`\n- Override the `emptyRatingBar` and `fillRatingBar` this two method, and then you can start implement your own animaion!\n\n\u003eYou can follow [ScaleRatingBar](https://github.com/ome450901/SimpleRatingBar/blob/master/library/src/main/java/com/willy/ratingbar/ScaleRatingBar.java) to implement your own class.\n\n## Todo\n- Implement some other animations\n- Find a better way to implement animation\n\n## About Me\nFollow me at [Medium](https://medium.com/@ome450901).\n\n## License\n```\nMIT License\n\nCopyright (c) 2019 WilliamYu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":["RatingView"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamyyu%2FSimpleRatingBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamyyu%2FSimpleRatingBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamyyu%2FSimpleRatingBar/lists"}