2

I wrote a simple class extending LinearLayout, that implements a ProgressBar and a TextView. I'm able to set the progress of the bar from the MainActivity calling the method _setProgress(int progr)_. Now I want to add this "CustomView" as an item of a ListView, but I also need a way to simply update the progress at any time: How can I do these 2 things?

Chirag Savsani
  • 6,020
  • 4
  • 38
  • 74
asdf
  • 97
  • 1
  • 10
  • 1
    Have a look at this post: http://stackoverflow.com/questions/19875838/download-multiple-files-with-a-progress-bar-in-listview-android – Chris May 04 '16 at 13:30
  • Use it in the list adapter class, for the progress update the easiest way is to keep the references of whatever you need to update later. – Nanoc May 04 '16 at 13:53
  • @Chris thanks, but there is another problem: in my class I have also a media player that plays or stops when clicking on the layout – asdf May 04 '16 at 15:06
  • The approach in the linked question should still work. If not, post the code for how you've implemented it and detail the problem you're experiencing. – Chris May 04 '16 at 15:08

0 Answers0