How to add items to a ListView in Android during runtime?
+4
A:
There must be an adapter that backs this ListView
. The Adapter must have taken some datastore(ArrayList etc.) as an argument.
Add your items to this list(the datastore that you've supplied to the adapter) and then call notifyDataSetChanged
() method on your adapter.
Samuh
2010-08-30 14:17:25
Wow, thanks @Samuh. That worked!
Ragunath Jawahar
2010-08-30 15:01:32
you're welcome!
Samuh
2010-08-31 05:55:50