Code example for CursorAdapter

Methods: getCount, getCursor

0
        .placeholder(R.drawable.contact_picture_placeholder) 
        .into(holder.icon);
  } 
 
  @Override public int getCount() { 
    return getCursor() == null ? 0 : super.getCount();
  } 
 
  private static class ViewHolder { 
    TextView text1;
    QuickContactBadge icon;
  } 
}