java - Issue with Changing ListView items dynamically -


i trying set image imageview item in listview. listview contains items has imageviews in them. trying change imageview of first item in list.

crop_donebtn.setonclicklistener(new view.onclicklistener() {             @override             public void onclick(view v) {                 final bitmap croppedimage = cropimageview.getcroppedimage();                  //instance of adapter                 profileadapter adapter =                         new profileadapter(eyewerprofile.this,                                 listdata) {                              @override                             public view getview(int position, view convertview, viewgroup parent) {                                  view view = super.getview(position, convertview, parent);                                 //the imageview need                                 imageview userpic = (imageview) view.findviewbyid(r.id.userpic);                                  userpic.setimagebitmap(croppedimage);                                  return view;                             }                         };             }         }); 

this doesn't , imageview of item doesn't change , doesn't crash either. doing right?

try

imageview userpic = (imageview) yourlistview.getitematposition(position); userpic.setimagebitmap(croppedimage); 

position should 0 in case.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -