@@ -0,0 +1,1420 @@
+package com.example.android.androidsimulator;%0A%0Aimport android.app.Activity;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.TextView;%0A%0Aimport java.util.ArrayList;%0A%0A%0Apublic class MessagesAdapter extends ArrayAdapter%3CMessages%3E %7B%0A%0A    public MessagesAdapter(Activity context, ArrayList%3CMessages%3E messages) %7B%0A        super(context, 0, messages);%0A    %7D%0A%0A    @Override%0A    public View getView(final int position, View convertView, ViewGroup parent) %7B%0A        View listItemView = convertView;%0A        if (listItemView == null) %7B%0A            listItemView = LayoutInflater.from(getContext()).inflate(%0A                    R.layout.list_messages, parent, false);%0A        %7D%0A%0A        final Messages currentListMessage = getItem(position);%0A%0A        // user message%0A        TextView userTextView = (TextView) listItemView.findViewById(R.id.user_textView);%0A        userTextView.setText(currentListMessage.getUser());%0A%0A        // last message of list%0A        TextView messageTextVIew = (TextView) listItemView.findViewById(R.id.message_textView);%0A        messageTextVIew.setText(currentListMessage.getMessage());%0A%0A        // date of last message%0A        TextView dateTextView = (TextView) listItemView.findViewById(R.id.date_textView);%0A        dateTextView.setText(currentListMessage.getDate());%0A%0A        return listItemView;%0A    %7D%0A%7D%0A

Add MessagesAdapter