I am using GPUImageView
component from android-gpuimage Library for displaying Images (with filtered applied on them) in my ListView
.
The Images are being loaded perfectly with filters for the First time in my ListView
but when i scroll down the ListView
, all the Scrolled Cells are displayed Blank.
Here is the code of the getView(...)
method of my 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); // this loads image on the current thread, should be run in a thread
thumb_giv.requestRender();
return convert_view;
}
Please tell me what i am doing wrong here ?
Any help is highly appreciated.