title: Passing interface to Fragment
body: <p>Let's consider a case where I have <code>Fragment A</code> and <code>Fragment B</code>.</p>
  
  <p><code>B</code> declares:</p>
  
  <pre><code>public interface MyInterface {
      public void onTrigger(int position);
  }
  </code></pre>
  
  <p><code>A</code> implements this interface.</p>
  
  <p>When pushing <code>Fragment B</code> into stack, how should I pass reference of <code>Fragment A</code> for it in <code>Bundle</code> so <code>A</code> can get the <code>onTrigger</code> callback when needed.</p>
  
  <p>My use case scenario is that <code>A</code> has <code>ListView</code> with items and <code>B</code> has <code>ViewPager</code> with items. Both contain same items and when user goes from <code>B -&gt; A</code> before popping <code>B</code> it should trigger the callback for <code>A</code> to update it's <code>ListView</code> position to match with <code>B</code> pager position.</p>
  
  <p>Thanks.</p>