I had various issues with progress bars -- sliders in my case -- and even replaced ListView with my own implementation. But I have a guess what my problem was, and of my own making.
Just for illustration purposes, here's my code replacing ListView: ViewGroup sliders = (ViewGroup)dlg.findViewById(R.id.sliders); int ocount = sliders.getChildCount(); View[] children = new View[ocount]; for (int i = ocount-1; i >= 0; --i) { children[i] = sliders.getChildAt(i); sliders.removeViewAt(i); } for (int i = 0; i < count; i++) { View child = (i < ocount) ? children[i] : null; View nView = m_adapter.getView(i, child, sliders); sliders.addView(nView, i); } Not so complicated. But you'll see that getView is responsible for everything about what finally gets displayed. It is given a candidate view for reuse, but: 1) It is up to getView() to determine whether it SHOULD reuse that view 2) If it doesn't, it should supply a brand new view 3) If it does -- it must completely update and reinitialize that new view. Note that getView() doesn't get very much information. Really, all it gets is i. But getItem(i) should return the specific item that's being displayed. So -- either your getView() is not updating or replacing the view properly, or getItem(i) is not returning the right item to getView() (which should be calling it), and so getView() is making the wrong decisions. I hope that helps. On Apr 12, 6:30 pm, Prajakta Shitole <prajakt...@gmail.com> wrote: > Is there anyone who had tried this.. the problem with my implementation is > that the list view is not getting refreshed..even after writing > notifyDataSetChanged.. only the first row gets displayed properly the rest > of the rows display the progress bar even when the images hv loaded. > > > > On Sun, Apr 11, 2010 at 8:46 AM, Tunneling <jasonalebl...@gmail.com> wrote: > > I'm also interested in this. I've been able to load a different image > > in place of the initial image, and then replace it when the background > > processing is completed. However, I would really like to show an > > indeterminate progress bar instead of an image. > > > J > > > On Apr 11, 9:48 am, praj <prajakt...@gmail.com> wrote: > > > Hi, > > > > I am trying to have a progress bar in every row of my list view. My > > > list is an iconic list view and have implemented it in the lazy > > > loading way..so i want to display a progress bar (spinning progress > > > bar) till the images are not loaded. My current approach is that i hv > > > placed the progress bar in the layout and in my code in the getView > > > method i dismiss it when the image is loaded. However this seems to > > > work properly only for the first row of the list view. The progress > > > bars are visible on the rest of the rows even if the image is loaded > > > and only when i scroll the list do the progress bars disappear so i am > > > assuming this is something to do with refreshing the list view. So I > > > have tried using notifyDataSetChanged in my getView but it is not > > > helping. > > > > Please can anyone let me know if they have worked on anything similar > > > to this. > > > > Thanks, > > > Prajakta > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > cr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > > To unsubscribe, reply using "remove me" as the subject. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en