-2

When i call notifyDataSetChanged() compiler goes into getCount() but not into getView method.

  • I am not adding the new list item, i have just changed some boolean in my existing list item object which i want to use into the if statement in getView method for doing some item-layout changes, but compiler never goes in getView even if i called notifyDataSetChanged()

  • for debug i tried to print log of that item boolean into getCount(), and that boolean value is changed!

So my question is: Why compiler not goes into getView method when i do some changes in list item? Any solution for this problem?

Janki Gadhiya
  • 4,492
  • 2
  • 29
  • 59
Marko Katic
  • 63
  • 1
  • 9
  • 2
    your getCount() must be returning `0`. Post youe code. – Janki Gadhiya May 07 '16 at 05:26
  • on youtube a user slidenerd has videos on that. Post your code and maybe you can find help here – Pomagranite May 07 '16 at 05:47
  • to: janki gadhiya - no, getCount() returns 1 – Marko Katic May 07 '16 at 12:37
  • to: janki gadhiya - no, getCount() returns 1, everything seams to be fine with adapter and list but as i said, when notify called compiler goes into getCount but not in getView. Code is very big project and I can't post that, sorry, if you know some other reasons or suggestions I'd appreciate it! – Marko Katic May 07 '16 at 12:43

1 Answers1

0

I have found the solution. Changing the list item and notifyDataSetChanged() method was not called from main thread.

Marko Katic
  • 63
  • 1
  • 9