# MaterialRatingBar **Repository Path**: HarmonyOS-tpc/MaterialRatingBar ## Basic Information - **Project Name**: MaterialRatingBar - **Description**: Material Design Rating with better appearance - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-26 - **Last Updated**: 2024-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: Rating, RatingBar ## README # MaterialRatingBar ![Icon](screenshot/launcher_icon-web.png) Material Design `Rating` with better appearance ## Why MaterialRatingBar? - Extends framework `Component`. - Get the 2vp star border background as in Material Icons and Google apps. - Correct custom tinting across platforms. - Able to render correctly when `width` is set to `match_parent`, as in Google Play Store. - Able to scale correctly when `height` is set to 'match_content'. - Able to display ratings such as `4.3` correctly, which will be filled to `4.5` by framework's incorrect implementation. - Avoid framework's sunken half star visual glitch. - Used as a drop-in replacement for framework `Rating`. ## Preview ![Sample app](screenshot/sample_app.jpg) ## Integration Gradle: ```gradle implementation 'io.openharmony.tpc.thirdlib:MaterialRatingBar:1.0.0' ``` ## Usage Simply replace your `Rating` with `MaterialRatingBar`, and remember to apply a corresponding style for correct behavior. For example, to create a normal `MaterialRatingBar`: ```xml ``` ## License Copyright 2016 Zhang Hai Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.