title: Android how to update 2nd tab according to 1st tab input?
body: <p>I have build 2 tabs using <code>Fragment</code>. 1st tab has a <code>EditText</code> and a <code>button</code>. If user input something in the <code>EditText</code> and click on the <code>button</code> it goes to 2nd tab. <code>onButtonClick</code> I have set to show 2nd tab but my value is not being updated. Although I have successfully written the 1st tab value in <code>session</code>. But don't know how to update the 2nd tab? How to rebuild the 2nd tab?</p>
  
  <p>Added my code here:</p>
  
  <p>In FragmentA I onButtonClick I have called this function:</p>
  
  <pre><code>private void goToFragmentB(String 1stTabValue)
  {
      ViewPager mViewPager = (ViewPager) getActivity().findViewById(R.id.pager);
         // My 2nd tab has a TextView where I need to set the 1stTabValue. What should be the code
         // to set 1stTabValue in 2nd tab
      mViewPager.setCurrentItem(1);
  }
  </code></pre>