title: Calling Activity methods from Fragment
body: <p>I use a fragment only inside one specific parent activity. Now I wonder if there are any drawbacks if I call methods in the parent activity directly from the included fragment like this:</p>
  
  <blockquote>
    <p>getActivity().someMethodInParentActivitiy()</p>
  </blockquote>
  
  <p>A more common solution would be to define a formal listener interface in the fragment to call back to the parent activity and then make the activity implement that interface. </p>
  
  <p>Are there any reasons (e.g. <em>reliability</em> or <em>speed</em>) why I should use the second more complex solution instead of direct method calls from the fragment to the activity?</p>