[英]RatingBar - When touch the RatingBar the stars get all filled up
我正在使用本地 RatingBar,我只有一個問題。
我有 5 顆星,一開始都是空的。 當我觸摸星星(或在評級欄上滑動手指)時,5 顆星被選中,當我將手指從屏幕上移開后,實際匯率就會顯示出來。
為什么會這樣?
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1"
android:rating="5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/subtitle"/>
圖片 1:我的手指放在屏幕上,出現在 3 號星中 圖片 2:我現在的手指離開屏幕
在<RatingBar>
中添加以下行
android:progressBackgroundTint="@color/white"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.