简体   繁体   中英

Image not changing on ImageView in Android

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

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();
           }
       });
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM