Umang
Umang

Reputation: 593

android - static progress bar in a list

I want to implement a static progress bar which displays the data I want. The code in this question looks fine - Android: Can a static horizontal progress bar be embedded in a Textview?

Instead of setting android:progress in the xml file, I'll use bar.setProgress() in the code.

I want to display this horizontal bar in a list as a part of the listentry. How can it be done?

Upvotes: 1

Views: 2267

Answers (1)

Rahul Choudhary
Rahul Choudhary

Reputation: 3809

Create a CustomListAdapter, see an example below

http://united-coders.com/phillip-steffensen/android-dealing-with-listactivities-customized-listadapters-and-custom-designed-0

Inside the getView() function return the view generated from an xml which contains progress bar and you are done.

Upvotes: 1

Related Questions