I have a listview defined by the following xml. I need to toggle the image in the list during runtime when the user clicks on any row. How can I achieve this? A
listview.setOnItemClickListener(new AdapterView.OnItemClickListener(){ public void onItemClick(AdapterView> arg0, View arg1, int arg2, long arg3) { ImageView imageView=arg1.findViewById(R.id.img); imageView.setImageResource(R.drawable.new_image); } });