Added onContextMenuItemSelected method to respond to context menu clicks