title: Can't set a paging contact list in android
body: <p>My app is taking forever to load,how can I use paging that's it would load me like 10-15 people in a page and not to take 2 minute to my app for loading??
  this is my code:
  thank's for the help </p>
  
  <pre><code>public class Contacts extends Util&lt;Contact&gt; {
      public Contacts(Activity activity) {
          super(activity);
      }
  
      @Override
      public void init() {
          list = getContactsBasic();  
          for (int i = 0; i &lt; list.size(); i++) {
              Contact current = list.get(i);
  
              current.image = getContactImage(current.id);
              if (current.hasPhone) {
                  current.phones = getContactPhones(current.id);
              }
          }
      }
  
      LinkedList&lt;Contact&gt; getContactsBasic() {
          Uri contactsUri = android.provider.ContactsContract.Contacts.CONTENT_URI;
          Cursor cursor = activity.getContentResolver().query(contactsUri, null, null, null, null);   
          LinkedList&lt;Contact&gt; list = new LinkedList&lt;Contact&gt;();
  
          if (cursor != null) {
              if (cursor.moveToFirst()) {
                  do  {
                      int id = cursor.getInt(cursor.getColumnIndex(android.provider.ContactsContract.Contacts._ID));
                      String name = cursor.getString(cursor.getColumnIndex(android.provider.ContactsContract.Contacts.DISPLAY_NAME));
                      int hasPhone = cursor.getInt(cursor.getColumnIndex(android.provider.ContactsContract.Contacts.HAS_PHONE_NUMBER));
  
                      // add more columns here
  
                      boolean hasPhoneBoolean; //editor: or simply: boolean hasPhoneBoolean = (hasPhone == 1)
  
                      if (hasPhone == 1){
                          hasPhoneBoolean = true;
                      }
                      else {
                          hasPhoneBoolean = false;
                      }
  
                      Contact contact = new Contact(id, name, hasPhoneBoolean);
                      //Contact contact = new Contact(id, name, (hasPhone == 1) ? true : false);
  
                      list.add(contact);
                  } 
                  while (cursor.moveToNext());
              }
              cursor.close();
          }
          return list;
      }
  
      LinkedList&lt;Phone&gt; getContactPhones(int id) {
          Uri phonesUri = android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
          String filter = android.provider.ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = " + String.valueOf(id);
          Cursor cursor = activity.getContentResolver().query(phonesUri, null, filter, null, null);
  
          LinkedList&lt;Phone&gt; list = new LinkedList&lt;Phone&gt;();
          if (cursor != null) {
              if (cursor.moveToFirst()) {
                  do {
                      String number = cursor.getString(cursor.getColumnIndex(android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER));
                      int type = cursor.getInt(cursor.getColumnIndex(android.provider.ContactsContract.CommonDataKinds.Phone.TYPE));
  
                      Phone phone = new Phone(number, type);  
                      list.add(phone);
                  } 
                  while (cursor.moveToNext());
              }
  </code></pre>