Added method to set the onItemClick policy programmatically