如果想通讯录进入详情页,那么最重要的参数就是contactId,这个是联系人的唯一标识
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
getListView().setOnItemClickListener( new AdapterView.OnItemClickListener() {
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
try {
Cursor cursor = (Cursor) getListAdapter().getItem(position); if (cursor == null ) {
return ; } int contactId = cursor.getInt(Personal.ID_COLUMN_INDEX); Intent intent = new Intent(); intent.setClass(ContactsList. this , ContactDetail. class ); intent.putExtra( "contactId" ,contactId); startActiv
|