Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding /deleting the items of ListView dynamically

 
Iab Android
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a base adapter which displays the list of the Twitter Fetched Friends. If it fetches all the friends , then not a problem but some times while fetching friends some exception might come and it wont fetch that particular friend. So at that time I need to delete that particular row. How can I add or delete the row in ListView dynamically?


 
Misha van Tol
Ranch Hand
Posts: 56
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using a BaseAdapter, try using a subclass of BaseAdapter, like ArrayAdapter<T>.
This will give you methods for adding and removing elements. (see ArrayAdapter<T>)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic