0

I want to make a custom rating bar, but instead of showing same image for each rate icon, i want to show numbers, such as 1, 2 ,3 ,4 ,5. I went through this and this. So i was able to create Custom Rating bar with same images. But i want different images for different rating. Any help would be appreciated.

EDIT 1: instead of this : default,

i want it like Green as filled and gray as empty

Community
  • 1
  • 1

1 Answers1

0

Create custom view by extending LinearLayout, and adding 5 TextViews into it with gray background. Process clicks on these TextViews by setting green background to the TextViews to the left of clicked one and to the clicked one. Also save the index of clicked textView as current selected rating.

Vladyslav Matviienko
  • 10,610
  • 4
  • 33
  • 52