Its very weird, but true. I am using ViewHolder pattern to increase the list performance. getView() method has bitmap, but the below code can't render the bitmap in the imageview of listview item.
if (convertView == null) {
convertView = layoutInflater.inflate(R.layout.item_view_contact_item, null);
viewHolder = new ViewHolder(convertView);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.
}
The above can't render bitmap in list row imageview. But the below code does
//if(convertView == null) {
convertView = layoutInflater.inflate(R.layout.item_view_contact_item, null);
viewHolder = new ViewHolder(convertView);
convertView.setTag(viewHolder);
//} else {
// viewHolder = (ViewHolder) convertView.
//}
In this case, everything(search, bitmap assignment to imageview) works fine. But this leads to reduction in list performance, as the layout inflation is happening every-time.
Kindly help.
Note: I am downloading the bitmaps in sepatrate AsyncTask, and assigning them in the arraylist, which is initially passed to the Adapter.