title: How to call a custom asyncloader from a fragment class
body: <p>I am trying to use <code>AsyncTaskLoader</code> to load data from a server and then I will put it in a list view later on. I followed <a href="https://www.youtube.com/watch?v=3d9BeWqlfTk" rel="nofollow">this tutorial</a> on YouTube. However, when I try to call the loader from another class which extends fragment, the loader won't accept the context.</p>
  
  <p>I tried:</p>
  
  <ol>
  <li><code>getActivity()</code></li>
  <li><code>getActivity().getApllicationContext()</code></li>
  </ol>
  
  <p>Neither worked.</p>