If you are going to modify your data set (by loading more data), you probably don't want to use ArrayAdapter.

Implementing your own adapter class (extending BaseAdapter) would let you append new data items to existing ones. After that, just call adapter.notifyDataSetInvalidated to update the UI.

-- Kostya

19.03.2011 14:30, Alaeddine Ghribi пишет:
Hello,
In my app i have this:
ListView L = (ListView) findViewById(R.id.lv);
L.setAdapter(new ArrayAdapter<String>(this, R.layout.list_item,
s[0]));

"lv" is my ListView and "list_item" is my TextView. I want to  store
datas in a file then have a string variable to take all this datas
then display it in a ListView(containing a TextView). Anyway, i'm
facing a display problem: sometimes the datas show and sometimes not!
So, i'm wondering if there is a tip to display all items in a ListView
without the necessity to use a TextView, perhaps it'll solve the
problem!

Thanks.



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to