Code example for ContextMenu

Methods: add, getItem

0
 
	@Override 
	public void onCreateContextMenu(ContextMenu menu, View v,
			ContextMenuInfo menuInfo) {
		// 
		super.onCreateContextMenu(menu, v, menuInfo);
		menu.add(Menu.NONE, 1, Menu.NONE, "Delete");
 
		menu.getItem(0).setOnMenuItemClickListener(this);
 
	} 
 
	public void initRemindersTimeListView() { 
		// 
		try { 
 
			mReminderTimeEntries = mSpendingTrackerDbEngine.getRemindersTime();
 
			listViewTimeReminders.setAdapter(new ClassAdapterReminderTime(
					getSherlockActivity(), mReminderTimeEntries));