百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MaterialRatingBar

> 设计协作
开源

具有更佳外观的 Material Design RatingBar

2.0K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

具有更佳外观的 Material Design RatingBar

MaterialRatingBar

采用 Material Design 的 RatingBar,外观更美观,兼容 Android 3.0+。

为什么要使用 MaterialRatingBar?

  • 在 Android 3.0 及更高版本上保持一致的外观。 - 扩展 RatingBar 框架。 - 获取 Material Icons 和 Google 应用程序中使用的 2dp 星形边框背景。 - 在跨平台上正确设置自定义调色。 - 当 layout_width 设置为 match_parent 时,能够正确渲染,如 Google Play Store 中。 - 当 layout_height 设置为除 16dp、36dp 和 48dp 以外的值时,能够正确缩放。 - 能够正确显示 4.3 等评分,这些评分将由框架的不正确实现填充为 4.5。 - 避免框架的下沉半颗星视觉错误。 - 用作框架 RatingBar 的替换。

只需将 RatingBar 替换为 MaterialRatingBar, 并记住应用相应的样式以实现正确的行为。例如, 要创建一个普通的 MaterialRatingBar:

您可以使用 app:mrb_fillBackgroundStars 来控制是否填充背景星星,否则默认为与 android:isIndicator 相同的值,这是 Google 应用程序的默认行为。此外,还支持 8 个与色调相关的属性,例如 app:mrb_progressTint 和 app:mrb_progressTintMode,以便它们可以控制进度条的色调。

Sample APK

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaandroidandroid-librarymaterial-designrating-bar

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类设计协作
定价开源

> 相关工具

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨