例如,我有一个5星相同的评级栏.当我滑过或触摸任何一颗星时,它会将所有星星从正常变为某种颜色,因为它表示它被评级.
我想要的是,有没有可能我们可以为评级栏的每颗星而不是5颗相同的星星提供5个独特的图像?
像第一颗星是太阳图像,第二颗星是月亮图像,第三颗星是一些方形图像等.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/rl_rating"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp" >
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="78dp"
style="@style/CustomRatingBar" />
</RelativeLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1021 次 |
| 最近记录: |