Search in sources :

Example 1 with Contact

use of flow.sample.tree.model.Contact in project flow by square.

the class ContactsAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    Contact contact = getItem(position);
    View view = convertView;
    if (view == null) {
        final LayoutInflater inflater = LayoutInflater.from(parent.getContext());
        view = inflater.inflate(R.layout.list_contacts_screen_row_view, parent, false);
    }
    ((TextView) view.findViewById(R.id.contact_name)).setText(contact.name);
    ((TextView) view.findViewById(R.id.contact_email)).setText(contact.email);
    return view;
}
Also used : LayoutInflater(android.view.LayoutInflater) TextView(android.widget.TextView) TextView(android.widget.TextView) View(android.view.View) Contact(flow.sample.tree.model.Contact)

Aggregations

LayoutInflater (android.view.LayoutInflater)1 View (android.view.View)1 TextView (android.widget.TextView)1 Contact (flow.sample.tree.model.Contact)1