[英]How to remove the RatingBar star border stroke in Android?
I am using RatingBar
in my application. 我在我的应用程序中使用RatingBar
。 For this rating bar app star I am getting the border stroke. 对于这个评级酒吧应用程序明星,我得到了边框描边。 How can I remove this border stroke? 如何删除该边框描边? Below are my xml and screenshot of the bar. 以下是我的xml和该栏的屏幕截图。
<RatingBar
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/ratingBarStyleSmall"
android:numStars="5"
android:stepSize="0.8"
android:scaleX="0.8"
android:scaleY="0.8"
android:isIndicator="true"
android:layout_marginStart="60dp"
android:layout_marginEnd="17dp"
android:layout_marginTop="4dp"
android:layout_below="@+id/userName" />
you need custom your ratingbar and provide your own images,default ratingbar's image contain border stroke: 您需要自定义等级栏并提供自己的图像,默认等级栏的图像包含边框描边:
<style name="RatingBarStyle" parent="@android:style/Widget.RatingBar">
<item name="android:progressDrawable">@drawable/ratingbar_selector</item>
<item name="android:minHeight">34dp</item>
<item name="android:maxHeight">34dp</item>
</style>
<item android:id="@+android:id/background"
android:drawable="@drawable/emotion_composer_rating_small_icon" />
<item android:id="@+android:id/secondaryProgress"
android:drawable="@drawable/emotion_composer_rating_small_icon" />
<item android:id="@+android:id/progress"
android:drawable="@drawable/emotion_composer_rating_small_icon_highlighted" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.