0

I have a ListView where every row updating on real time. While file downloading in the ListView you can see the progress of downloading of every file (several files, that's why ListView). And you can click on the item of ListView, and doing something with progress of downloading.

I used method .notifyDataSetChanged(); of Adapter to set dynamic data. And everything is good, but after scrolling the ListView I cannot click on any item. If I don't scroll, I can click on items that I see without scrolling. How can I fix this?

8
  • how are you setting your setOnClickListener()?
    – Bill Mote
    Oct 10, 2012 at 17:21
  • off course. It works if I don't scroll the list
    – ruslanys
    Oct 10, 2012 at 17:39
  • What specific happens when you click a Item after scrolled, nothing? and are you using OnClickListener or OnItemClickListener?
    – baTimá
    Oct 10, 2012 at 18:24
  • 1
    I didn't say "are you setting"; I said, "How are you setting ..."
    – Bill Mote
    Oct 10, 2012 at 18:36
  • @baTimá I'm using OnItemClickListener. And nothing happens.
    – ruslanys
    Oct 10, 2012 at 19:39

1 Answer 1

2

Try this - probably your list item clicks are being intercepted (assuming onitemclick listener)

listView.setOnScrollListener(new OnScrollListener() {
        public void onScrollStateChanged(AbsListView view, int scrollState) {
            if ( scrollState == OnScrollListener.SCROLL_STATE_IDLE )
            {
              listView.invalidateViews();
            }

        }

        @Override
        public void onScroll(AbsListView arg0, int arg1, int arg2, int arg3) {}
    });

If this doesnt work post more code so we can understand what you are asking

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.