I have the following code in the onCreate method of an Activity:
GridLayout gridLayout = new GridLayout(this);
gridLayout.setColumnCount(5);
gridLayout.setRowCount(5);
for (int i = 0; i < 25; i++) {
ImageView imageView = new ImageView(this);
gridLayout.addView(imageView, i);
}
setContentView(gridLayout);
Now, I'd like for each ImageView in the GridLayout to respond to (listen for) a double-click. How can I go about doing this? (I've already used a long-press on one of the Views to perform a different action so I can't just use this instead, although I realize that would be easier since there's a native listener for it.)