Image not changing on ImageView in Android

130 Views Asked by At

I am using universal image loader for showing Image on Imageview

First i load three Images on four Imageview, Loading sucessfully

          imageLoader.displayImage(imageUrls[0], holder.thumbImage1, options);
         imageLoader.displayImage(imageUrls[0], holder.imgProperty, options);
         imageLoader.displayImage(imageUrls[1], holder.thumbImage2, options);
         imageLoader.displayImage(imageUrls[2], holder.thumbImage3, options);

after That i click on holder.thumbImage1 and want to changed image on holder.imgProperty

 holder.thumbImage2.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                imageLoader.displayImage(url1, holder.imgProperty, options);
            }
        });

but image is not changing and also i am not getting any error

Please help me how i can fix this issue.

Thanks In Advance

1

There are 1 best solutions below

5
Blaze Tama On

Try to call notifyDataSetChanged :

holder.thumbImage2.setOnClickListener(new OnClickListener() {

           @Override
           public void onClick(View v) {
               // TODO Auto-generated method stub
               imageLoader.displayImage(url1, holder.imgProperty, options);
               notifyDataSetChanged();
           }
       });
}