Android手机系统的手机功能开发例子
insertContactsDialog();
}
//关闭Cursor
if (cursor != null) {
cursor.close();
}
ContactsAdapter contactsAdapter
ContactsAdapter(this,contacts_lable,contactslist);
listView.setAdapter(contactsAdapter);
listView.setOnItemClickListener(this);
}
/**
* 适配器 * * @author wangyueyishi */ public class ContactsAdapter extends BaseAdapter { private LayoutInflater mInflater; private List<Map<String, Object>> mList; private String[] mIndex; = new public ContactsAdapter(Context context, String[] index,List<Map<String, Object>> list) { mInflater = LayoutInflater.from(context); mList = list; mIndex = index; } public int getCount() { return Math.min(mList.size(), mList.size()); } public Object getItem(int position) { return mList.get(position % mList.size()); } public long getItemId(int position) { return position; }