That is hard to figure out without you posting the code of your adapter and 
how you create an instance of your adapter. It is probably a subtle bug...

On Friday, May 16, 2014 2:34:19 PM UTC-4, plnelson wrote:
>
>
> Sorry -  should be lv.get*Count*.
>
> And yes, I am calling notifyDataSetChanged.   
>
> I've also tried calling the ListView's *invalidate()* method, with no 
> change in the behavior.
>
> Since posting this I've written a whole separate version of the program 
> where I initially display 12 items ( listItems.size() == 12).  That part 
> works fine.  I then shrink my list to 6 by ...
>
>
>    - clear my listItems 
>
> *      (  listItems.size() == 0  )*
>
>    - add in 6 new items 
>
> *      (  listItems.size() == 6  )*
>
>    - call notifydataSetChanged()
>
>
> ... but the ListView's getCount still returns 12!    Why?    And is this 
> why the adapter's getCount() returns with an index that's too high for it's 
> dataset?
>
>
>>>
>>>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to