Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think solution for you problem is using custom list adapter witch each item include contact name and contact ID, here is detail:</p> <p>1) Try to create custom contact item bean include 2 properties: contactID, contactName</p> <pre><code>public class contactItem{ private long contactID; private String contactName; //... } </code></pre> <p>Create CustomContactAdapter:</p> <pre><code>public class CustomContactAdapter extends ArrayAdapter&lt;contactItem&gt;{ ArrayList&lt;contactItem&gt; itemList = null; //Constructor public CustomContactAdapter (Context context, int MessagewResourceId, ArrayList&lt;contactItem&gt; objects, Handler handler) { //Save objects and get LayoutInflater itemList = objects; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; final ReceiveMailStruct contact= items.get(position); if (contact!= null) { view = inflater.inflate(R.layout.layout_display_contact_item, null); //Set view for contact here } } } </code></pre> <p>Search custom adapter for more information</p> <p>2)To handler click event at ListView you must register an handler for listitem: Step1: Register handler to List item:</p> <pre><code>lvContacts.setOnItemClickListener(new HandlerListClickEvent()); </code></pre> <p>Step2: Implement proccess when item click (check/uncheck)</p> <pre><code>class HandlerListClickEvent implements OnItemClickListener { public void onItemClick( AdapterView&lt;?&gt; adapter, View view, int position, long id ) { //Get contact ID here base on item position } </code></pre> <p>Hope it help, Regards,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload