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
Post a Comment