Search in sources :

Example 1 with ContactItem

use of com.fsck.k9.helper.ContactItem in project k-9 by k9mail.

the class EmailAddressList method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.email_address_list);
    Intent i = getIntent();
    ContactItem contact = (ContactItem) i.getSerializableExtra(EXTRA_CONTACT_ITEM);
    if (contact == null) {
        finish();
        return;
    }
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.email_address_list_item, contact.emailAddresses);
    ListView listView = getListView();
    listView.setOnItemClickListener(this);
    listView.setAdapter(adapter);
    setTitle(contact.displayName);
}
Also used : ListView(android.widget.ListView) ContactItem(com.fsck.k9.helper.ContactItem) Intent(android.content.Intent) ArrayAdapter(android.widget.ArrayAdapter)

Aggregations

Intent (android.content.Intent)1 ArrayAdapter (android.widget.ArrayAdapter)1 ListView (android.widget.ListView)1 ContactItem (com.fsck.k9.helper.ContactItem)1