Context in a PreferenceFragment
<p>taken from <a href="http://developer.android.com/guide/topics/ui/settings.html" rel="nofollow">http://developer.android.com/guide/topics/ui/settings.html</a>:</p>

<blockquote>
  <p>Note: A PreferenceFragment doesn't have a its own Context object. If
  you need a Context object, you can call getActivity(). However, be
  careful to call getActivity() only when the fragment is attached to an
  activity. When the fragment is not yet attached, or was detached
  during the end of its lifecycle, getActivity() will return null.</p>
</blockquote>

<p>If I call getActivity() from within the OnCreate() method of a PreferenceFragment then can I be assured that the fragment is attached to its activity - or is there some other way you should get the Context in this instance?</p>

<p>The reason I need a Context is I'm trying to use a Toast notification from the PreferenceFragment</p>
