コード例 #1
0
 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);
   }
 }
コード例 #2
0
 public void onItemClick(AdapterView<?> adapterView, View view, int i, long rowId) {
   StatusDao status = StatusDao.get(this, rowId);
   UserHelper.viewProfile(this, status.getUserId());
 }