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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -