Open GoogleCodeExporter opened 9 years ago
I'm in the same boat, would appreciate sample code, as I'm a java/android noob
as well. While I've managed to get the menu to work/load, i can't get click
handling to work. I've got the following:
public boolean IconContextItemSelectedListener(MenuItem item){
if (item.getItemId()==1)
{
//code for Edit Debt
Intent EditDebtActivity = new Intent(getBaseContext(), EditDebt.class);
EditDebtActivity.putExtra(DbAdapter.KEY_DEBT, dName);
EditDebtActivity.putExtra(DbAdapter.KEY_STARTINGAMOUNT, dStartAmount);
EditDebtActivity.putExtra(DbAdapter.KEY_CURRENTAMOUNT, dCurrentAmount);
EditDebtActivity.putExtra(DbAdapter.KEY_DUEDATE, dDueDate);
EditDebtActivity.putExtra(DbAdapter.KEY_INTERESTRATE, dInterestRate);
EditDebtActivity.putExtra(DbAdapter.KEY_MINPAYMENT, dMinPayment);
startActivity(EditDebtActivity);
return true;
} else if (item.getItemId()==2)
{
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)item.getMenuInfo();
processDelete(info.id);
((BaseAdapter) adapter1).notifyDataSetChanged();
constantsCursor.requery();
updateTotalProgress();
return true;
}
return super.onContextItemSelected(item);
}
But it doesn't work. any help please?
Original comment by EVANRIC...@gmail.com
on 29 Sep 2011 at 7:22
Hi I found one example,
follow the thread.
keep me informed please:
mirko.ugolini@gmail.com
Regards
Original comment by Mirko.Ug...@gmail.com
on 11 Feb 2012 at 7:01
Original issue reported on code.google.com by
bill.bos...@gmail.com
on 31 Mar 2011 at 2:35