0

I want to show a image on click item of listview which is showing in dialog. But as I click on item is Image is showing in multiple items Can anyone suggest me how to do this.

  listQuantity.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
               view.findViewById(R.id.img_check).setVisibility(View.VISIBLE);
        }
    });
  • you also need to reset previous clicked item image to `INVISIBLE` before setting current clicked item image VISIBLE. – ρяσѕρєя K Jun 24 '15 at 18:26
  • I did reset previous clicked item but when I clicked again any other item there are showing multiple image on different items. – Sandeep K Jun 24 '15 at 18:32

1 Answers1

0

You have to use to optimize your listview holder, you could upload the code you're using to help better

http://java.dzone.com/articles/android-listview-optimizations

http://android.amberfog.com/?p=296

Woz
  • 350
  • 7
  • 13