Add this to yuor getView()
method
if(contacts.getContacts().get(position).getPhone() != null) {
ImageView contactIcon = (ImageView) convertView.findViewById(R.id.pic);
TextView contactName = (TextView) convertView.findViewById(R.id.name);
contactName.setText(contacts.getContacts().get(position).getDisplayName());
contactIcon.setImageBitmap(contacts.getContacts().get(position).getThumbNail());
}else{
ImageView contactIcon = (ImageView) convertView.findViewById(R.id.pic);
TextView contactName = (TextView) convertView.findViewById(R.id.name);
contactName.setText("");
contactIcon.setImageBitmap(null);
}
It happens when getPhone()
returns null and convertView
does not update.