I will try to explain my problem with adding elements to my ArrayAdapter and refresh the ListView:
I have two tabs [TAB1][TAB2], with two Fragments and attached with TabListeners.
- I request a
WebServiceto retrieve my first elements (15 items more or less) of theListView, withgetLoaderManager().initLoader(0x01, null, this); - If I scroll at the bottom of the
ListView, I request to populate more items (20 items more or less), withAsyncTask. AsyncTaskadd more items to anArrayAdapter, then ImArrayAdapter.notifyDataSetChanged();- Click on the [TAB2] and then return to [TAB1]
- The
initLoaderis called again, BUT theArrayAdapterstill have the elements of the first call!
I'm missing something? I need to store the ArrayAdapter, onSaveInstance or similar?
Thank you in advance.