8

For example I have a rating bar of 5 same stars. When I swipe over or touch on any star it will change all stars from normal to some color as it indicates it is rated.

What I want is, is there any possibility that we can have 5 unique images for each star of rating bar instead of 5 same stars?

like 1st star is sun image, 2nd star is moon image, 3rd star is some square image etc..

<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>
Rajen Raiyarela
  • 5,526
  • 4
  • 21
  • 41
Asif Sb
  • 785
  • 9
  • 38
  • 1
    take a look at this http://stackoverflow.com/questions/5800657/how-to-create-custom-ratings-bar-in-android – saurabh64 May 11 '15 at 07:33
  • 1
    @saurabh64..thanks for your comment..your referral link is useful but i need more customized rating bar.. – Asif Sb May 11 '15 at 09:30
  • Possible duplicate of [How to create Custom Ratings bar in Android](https://stackoverflow.com/questions/5800657/how-to-create-custom-ratings-bar-in-android) – Vladimir Markeev Oct 25 '17 at 07:24

0 Answers0