title: Cannot resolve symbol 'getActivity'
body: <p>I'm trying to implement a fragment, and am using the <a href="https://developer.android.com/guide/components/fragments.html" rel="nofollow">Android example</a> as a guide.</p>
  
  <p>In the onActivityCreated() method of the TitlesFragment class, there is this line:</p>
  
  <pre><code>View detailsFrame = getActivity().findViewById(R.id.details);
  </code></pre>
  
  <p>When I try to include a similar line in my code, I get the error that the 'getActivity' symbol can't be resolved.</p>
  
  <p>I've tried importing everything that their example imports, but it doesn't seem to make any difference.  Nor can I find any documentation anywhere that helps me know how to make this accessible.</p>
  
  <p>So, what's the secret on being able to use getActivity?  </p>