Skip to content Skip to sidebar Skip to footer

I Can Update The Listview But How?

I have a list and linkedhashmap.I am defining with following lines in top of main class: List conversationsList=new ArrayList(); LinkedHashM

Solution 1:

are you familiar with notifyDataSetChanged() and notifyDataSetInvalidated() methods in your adapter? after every change of data set which is used to be drawn in List/Grid you should call one of these two methods (probably first one) after updateConversations(conversationsList);

also: line new ArrayList<Conversation>(conversationsMap.values()); should do a shallow copy of your map values, check this stack thread about set copying for more info

Post a Comment for "I Can Update The Listview But How?"