title: LoaderManager not initializing... a issue with getLoaderManager().initLoader
body: <p>I know there is a lot of common questions like this out there but I just can't seem to find the solution. When I attempt to initialize my loader using <code>getLoaderManager().initLoader(LOADER_ID, null, this);</code> The error The method initLoader(int, Bundle, LoaderManager.LoaderCallbacks) in the type LoaderManager is not applicable for the arguments (int, null, Gridview) comes up. </p>
  
  <p>This leads me to believe that the program is not recognizing that Gridview implements the loader manager. I'm not sure why this is and where to go from here. I tried playing around with different imports but that didn't work. I also made sure I had the proper downloads to support loaders. The code I am using is below.</p>
  
  <pre><code>package com.example.camerapreview;
  
  import android.support.v4.app.LoaderManager;
  import android.support.v4.app.LoaderManager.LoaderCallbacks;
  import android.support.v4.content.CursorLoader;
  import android.support.v4.content.Loader;
  import android.support.v4.widget.CursorAdapter;
  
  //Omissis imports
  
  
  public class Gridview extends Activity implements LoaderManager.LoaderCallbacks&lt;Cursor&gt;{       
      private static final String TAG = "Checking Database";
      private static final String TAG1 = "Checking Thumbnail";
  
      Cursor cursor;
      int columnindexid;
      int columnindexdata;
      int videoidindex;
      int videopathindex;
      GridviewData entry;
      GridView gridview;
      VideoAdapter videoadapter;
      Cursor curs;
  
      ImageLoaderConfiguration config;
  
      String[] mediaColumns = {
          MediaStore.Video.Media._ID,
          MediaStore.Video.Media.DATA,
          MediaStore.Video.Media.TITLE,
          MediaStore.Video.Media.MIME_TYPE
      };
  
      private static final int LOADER_ID = 1;
      int flags = 0;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.preview);
          gridview = (GridView) this.findViewById(R.id.gridview);
  
  
          cursor = getContentResolver().query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, mediaColumns, null, null, null);
          columnindexid = cursor.getColumnIndexOrThrow(MediaStore.Video.Media._ID);
          columnindexdata = cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA);
  
          entry = new GridviewData(this);
          entry.open();
  
          getLoaderManager().initLoader(LOADER_ID, null, this);
          DataEntry putitin = new DataEntry(entry, this);
          putitin.execute();
  
          //the cursor used in the cursor adapater
          curs = entry.adapterCursor();
          videoidindex = entry.Indexfinder(curs);
          videopathindex = entry.Indexfinder2(curs);
  
          config = new ImageLoaderConfiguration.Builder(this)
                          .imageDownloader(new BaseImageDownloader(this))
                          .build();
  
          ImageLoader.getInstance().init(config);
          Log.i(TAG, "Before set adapater");
          gridview.setAdapter(new VideoAdapter(this, curs, flags));
       }
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <pre><code>@Override
  public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
      String[] projection = { GridviewData.VIDEOID, GridviewData.VIDEOFILEPATH };
      return new CursorLoader(Gridview.this, MyContentProvider.CONTENT_URI, projection, null, null, null);
  }
  
  @Override
  public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor c) {
      cursoradapter.swapCursor(c);
  }
  
  @Override
  public void onLoaderReset(Loader&lt;Cursor&gt; loader) {
      cursoradapter.swapCursor(null);     
  }
  </code></pre>