Reputation: 21
I have a ListView populated with numeric values from database .....
Now for each record I would like to display a colored horizontal bar (ie for example, if the value is 90 bar must be wide about 90% of the screen ... and so on all other values)
I think there is no need to use a library type aChartEngine to achieve the purpose .....
Have you heard about?? thanks
this is my code to calculate the percentage
value = value / total *100;
Upvotes: 0
Views: 188
Reputation: 3147
For this you have to use custom list view with adapter. Here's a simple code you can use http://www.thepcwizard.in/2012/09/android-creating-custom-listview-for.html
Upvotes: 1
Reputation: 2701
What you're going to have to do is create a custom adapter for your ListView. Here's a tutorial you can use: http://commonsware.com/Android/excerpt.pdf, scroll down to page 22.
Then you can use a ProgressBar for each view.
Upvotes: 0