【发布时间】:2015-06-24 13:48:49
【问题描述】:
在升级到“com.google.android.gms:play-services:7.5.0”之前,我的应用程序运行良好。我在一个运行良好的活动中使用 RatingBar。但升级后,Ratingbar 颜色显示为白色。即使我尝试使用代码和布局更改颜色,但颜色显示为白色。但是当我触摸评分栏时,会出现一些绿色的评分栏。
代码:
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ratingBar"
android:layout_gravity="center_horizontal"
android:numStars="5"
android:theme="@style/Theme.AppCompat.Light"
android:stepSize="0.5"
android:progressBackgroundTint="#ff048ec4"
android:progressTint="#ff048ec4"
android:progressBackgroundTintMode="multiply"
android:progressTintMode="multiply" />
问题仅在于低于 Lollipop 的版本。 Lollipop 中没有问题,但在 Kitkat 和更低版本中,颜色显示为白色。
有人知道这个问题的解决方案吗? 提前致谢。
【问题讨论】:
标签: android android-widget google-play-services ratingbar