how to make imageview in gridview link to activity

view story

http://stackoverflow.com – i have a gridview that content some image view, i want from this image view of the grid view can get onclick to change a activity, how can i do it, i try this code but it not work.in main activity a init a grid view and add imageview to it, then i try to create onclick even but it not work gridview.findViewById(R.id.image).setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent myIntent = new Intent(view.getContext(), DetailsActivity.class); startActivity(myIntent); } }); (HowTos)