GPUImageView rendering Blank after Scroll in ListView Android -


i using gpuimageview component android-gpuimage library displaying images (with filtered applied on them) in listview.

the images being loaded filters first time in listview when scroll down listview, scrolled cells displayed blank.

here code of getview(...) method of custom baseadapter :

@override public view getview(int position, view convert_view, viewgroup arg2) {     // todo auto-generated method stub      if(convert_view == null)     {         if(inflater == null)             inflater = (layoutinflater) this.context.getsystemservice(context.layout_inflater_service);          convert_view = inflater.inflate( r.layout.filter_item , null);      }      textview thumb_file_name_tv = (textview) convert_view.findviewbyid(r.id.filter_item_thumb_tv);      gpuimageview thumb_giv = (gpuimageview) convert_view.findviewbyid(r.id.filter_item_thumb_giv);      log.d(tag, "image uri = "+imageuri);      thumb_file_name_tv.settext(""+filternames.get(position).tostring().trim());      thumb_giv.setfilter(new gpuimagesepiafilter());      thumb_giv.setimage(imageuri); // loads image on current thread, should run in thread      thumb_giv.requestrender();      return convert_view;  } 

please tell me doing wrong here ?
highly appreciated.

it has been while since used library, remember, if change image in view, need call deleteimage() before settings new image.
try calling method before calling setimage() might need check if view has image present before can call deleteimage() or might throw error.

edit :
add following methods gpuimageview.java class of android-gpuimage library :

public void deleteimage()  {  mgpuimage.deleteimage();  } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -