Skip to content

Instantly share code, notes, and snippets.

@subbuboyapati
Last active November 25, 2015 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subbuboyapati/d018b0ccfa6c009b78e1 to your computer and use it in GitHub Desktop.
Save subbuboyapati/d018b0ccfa6c009b78e1 to your computer and use it in GitHub Desktop.
public void refreshMessages(ChatMessage message) {
this.messages.add(message);
notifyDataSetChanged();
}
public void onMessageReceived(Message message) {
runOnUiThread(new Runnable() {
@Override
public void run() {
MListAdapter.refreshMessages(message);
MListAdapter.notifyDataSetChanged();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment