Android 选择后,使用每个星星的不同自定义图像自定义分级栏
例如,我有一个5颗星的评级条。当我扫过或触摸任何一颗星星时,它会将所有星星从正常状态更改为某种颜色,因为它表明它是额定的 我想要的是,我们是否有可能为评级栏的每颗星提供5张独特的图片,而不是5张相同的星星 比如第一颗星是太阳像,第二颗星是月亮像,第三颗星是一些正方形的像等等Android 选择后,使用每个星星的不同自定义图像自定义分级栏,android,ratingbar,Android,Ratingbar,例如,我有一个5颗星的评级条。当我扫过或触摸任何一颗星星时,它会将所有星星从正常状态更改为某种颜色,因为它表明它是额定的 我想要的是,我们是否有可能为评级栏的每颗星提供5张独特的图片,而不是5张相同的星星 比如第一颗星是太阳像,第二颗星是月亮像,第三颗星是一些正方形的像等等 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pa
<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>
看看这个@saurabh64