title: Initializing a Loader in an Activity
body: <p>I am currently trying to learn how to use Loaders and am having trouble starting a Loader in my activity.</p>
  
  <pre><code>import android.support.v4.app.LoaderManager;
  import android.support.v4.content.Loader;
  
  public class ASwitchActivity extends Activity implements 
               LoaderManager.LoaderCallbacks&lt;SampleLoader.SampleLoaderResult&gt; {
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          getLoaderManager().initLoader(0, null, this);
      }
  
      public Loader&lt;SampleLoader.SampleLoaderResult&gt; onCreateLoader(int id, Bundle args) {
        return new SampleLoader(getBaseContext(), account, "dog");
  }
  
    public void onLoadFinished(Loader&lt;SampleLoader.SampleLoaderResult&gt; loader, SampleLoader.SampleLoaderResult out)
    {
        TextView t=(TextView)findViewById(R.id.testTV);
        t.setText("yay");
    }
  
    public void onLoaderReset(Loader&lt;SampleLoader.SampleLoaderResult&gt; loader){
  
    }
  }   
  </code></pre>
  
  <p>However Eclipse gives an error stating:</p>
  
  <blockquote>
    <p>The method initLoader(int, Bundle, LoaderManager.LoaderCallbacks)
    in the type LoaderManager is not applicable for the arguments (int,
    null, ActivitySwitchActivity)</p>
  </blockquote>
  
  <p>Can anyone help with where I am going wrong?</p>