I am Adding an array of ImageViews and set an image to each ImageView dynamically and I\'m done with it. But the problem is how to set/define onCl
This worked for me in fragment
// update the Youtube thumbnail images
this.youtube_thumbnail = (ImageView) listView.findViewById(R.id.youtube_thumbnail);
this.youtube_thumbnail.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
System.out.println("Adding youtube thumbnail");
}
});