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.
Asked
Active
Viewed 122 times
0
-
1can you add some images? – Pavya Jul 27 '15 at 07:27
-
1And can you add some code? – moffeltje Jul 27 '15 at 07:34
-
@user3676184 Check it now.. – Harsh Vishwakarma Jul 27 '15 at 08:45
1 Answers
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
-
I wanted to make utilization of Ratingbar instead of using TextView. Is it not possible with rating bar widget? – Harsh Vishwakarma Jul 27 '15 at 08:46
-
-
Thanks !! That was the only question in my mind.. @user3676184. I used Textview as Vlad matvienko suggested. – Harsh Vishwakarma Sep 07 '15 at 11:19