public boolean onContextItemSelected(MenuItem item) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); long rowId = info.id; StatusDao status = StatusDao.get(this, rowId); long userId = status.getUserId(); switch (item.getItemId()) { case R.id.view_profile: UserHelper.viewProfile(this, userId); return true; case R.id.send_message: UserHelper.sendMessage(this, userId); return true; default: return super.onContextItemSelected(item); } }
public void onItemClick(AdapterView<?> adapterView, View view, int i, long rowId) { StatusDao status = StatusDao.get(this, rowId); UserHelper.viewProfile(this, status.getUserId()); }