Code example for ContextMenu

Methods: add, setHeaderTitle

0
	        try {  
	             info = (AdapterView.AdapterContextMenuInfo) menuInfo; 
	             CommentListItem item = (CommentListItem) info.targetView;
	             if(item != null) {
	            	 if(item.isDeleteOk()) {
	            		  menu.setHeaderTitle("Delete");
	            		  menu.add(Menu.NONE, 0, 0, "Delete this comment");
	            	 } 
	             } 
	        }  
	        catch (ClassCastException e) {} 
		} 
	} 
	 
	public CommentListView getCommentListView() { 
		return commentListView;
	} 
 
	/** 
	 * @param commentActivity 
	 * @param item