bug with notifyDataSetChanged() in ArrayAdapter ?

by Christophe » Wed, 16 Jun 2010 21:08:03 GMT

Sponsored Links
 hello everyone,

I have a strange problem with one of my ListActivity. I have overrided
the default ArrayAdapter in order to customize my list. I have then
filled the adapter with an ArrayList.

If I insert an element on the list and then call
notifyDataSetChanged() on the adapter everything works fine.

But if I insert an element at the END of the list and then call
notifyDataSetChanged(), the new element doesn't  appear ...

And finally if I override getCount() on my adapter like this :

public int getCount() {
        return myArrayList.size();

then everything works fine.
Is this a bug or am I doing something wrong ?


Other Threads

1. Selected state of WebView in a ListView does not show selection

We built an app at some point that was made of a ListView of WebViews.
I haven't tried this in a while though.

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


2. Selected state of WebView in a ListView does not show selection

Question, is there a way to show that a WebView item contained as a
item in a ListView is selected?  Right now the WebView does not seem
to display its contents transparently like every other control so it
takes up the entire view and does not show its state as selected.

Also, when the content of the WebView is selected, scrolling down with
the track back does not seem to cause the WebView to loose focus.  If
I continue to scroll down with the track ball, all of a sudden an item
in the middle of the ListView gets selected.  This seems kind of odd
to me...


3. how to pass object as a parameter when starting a service

4. Some Activities never display UIs?

5. Starting multiple services sequentially

6. MMS ( Messaging App ) ACTION_SEND "text/plain"

7. android DNS fail to resolve website IP adddres