title: I cant implement CursorLoader because of Fatal Error
body: <p>I am trying to create Fragment of ListView within Activity to interact with CursorLoader to get data from sqlite database and load it synchronously into listview which within Frgament  </p>
  
  <p>code of activity :</p>
  
  <pre><code>package com.example.startup.myfriends;
  
  import android.app.Fragment;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.support.design.widget.FloatingActionButton;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentTransaction;
  import android.support.v7.app.AlertDialog;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  
  
  public class MainActivity extends AppCompatActivity {
  
  FloatingActionButton floatingActionButton;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      setToolbar();
  
      floatingActionButton = findViewById(R.id.mainActivityAddFriendFloatingButton);
  
      floatingActionButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              startActivity(new Intent(getBaseContext(), AddFriend.class));
          }
      });
  
      FragmentManager fragmentManager = getSupportFragmentManager();
      FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
      fragmentTransaction.add(R.id.familyLayoutContainer, new FamilyListViewFragment()).commit();
  }
  
  
  private void setToolbar() {
      android.support.v7.widget.Toolbar toolbar = findViewById(R.id.mainActivityToolbar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setTitle("Family");
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.menu_add_friend, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
      builder.setTitle("You'll Delete All Items. Are You Sure ?");
      builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialogInterface, int i) {
          }
      });
      builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialogInterface, int i) {
  
          }
      });
  
      builder.show();
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Fragment CursorLoader Code :</p>
  
  <pre><code>package com.example.startup.myfriends;
  
  import android.database.Cursor;
  import android.database.DatabaseUtils;
  import android.net.Uri;
  import android.os.Bundle;
  import android.provider.ContactsContract;
  import android.support.annotation.Nullable;
  import android.support.v4.app.Fragment;
  import android.support.v4.app.ListFragment;
  import android.support.v4.app.LoaderManager;
  import android.support.v4.content.CursorLoader;
  import android.support.v4.content.Loader;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ListView;
  
  import com.example.startup.myfriends.data.AppContract;
  import com.example.startup.myfriends.data.FamilyListCursorAdapter;
  
  public class FamilyListViewFragment extends ListFragment implements LoaderManager.LoaderCallbacks&lt;Cursor&gt; {
      ListView listView;
      FamilyListCursorAdapter familyListCursorAdapter;
      private Cursor mDetailCursor;
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
  
          return inflater.inflate(R.layout.fragment_family_list_view, container, false);
  
      }
  
      @Override
      public void onActivityCreated(@Nullable Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
          listView = getActivity().findViewById(R.id.listView);
  
  
          final String projection [] = {
                  AppContract.Family.COLUMN_ID,
                  AppContract.Family.COLUMN_NAME,
                  AppContract.Family.COLUMN_LAST_NAME,
                  AppContract.Family.COLUMN_AGE,
                  AppContract.Family.COLUMN_GENDER
          };
  
          Cursor cursor = getActivity().getContentResolver().query(AppContract.Family.CONTENT_URI,
                  projection, null, null, null);
  
          /*
  
          familyListCursorAdapter = new FamilyListCursorAdapter(getActivity().getBaseContext(), cursor);
          listView.setAdapter(familyListCursorAdapter);
          */
  
          familyListCursorAdapter = new FamilyListCursorAdapter(getActivity().getBaseContext(), cursor);
          listView.setAdapter(familyListCursorAdapter);
  
          getLoaderManager().initLoader(1, null, this);
  
  
      }
  
      @Override
      public Loader&lt;Cursor&gt; onCreateLoader(int i, Bundle bundle) {
          Uri CONTACT_URI = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
          CursorLoader cursorLoader = new CursorLoader(getActivity(), CONTACT_URI, null,
                  null, null, null);
  
          /*
          cursor.moveToFirst();
  
          */
  
          return cursorLoader;
  
      }
  
      @Override
      public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor cursor) {
         familyListCursorAdapter.swapCursor(cursor);
  
      }
  
      @Override
      public void onLoaderReset(Loader&lt;Cursor&gt; loader) {
          familyListCursorAdapter.swapCursor(null);
      }
  }
  </code></pre>
  
  <p>MyApp Always is crashed like this :<a href="https://i.stack.imgur.com/ozAr6.png" rel="nofollow noreferrer">Crashed App snap shot</a></p>
  
  <p><a href="https://i.stack.imgur.com/w4wfv.png" rel="nofollow noreferrer">Error Message snap shot</a></p>
  
  <p>Please any help am trying to fix it am trying from yesterday to fix it by myself but I quit :(</p>