title: Passing data from one tab to another using ActionBar.TabListener
body: <p>I have <code>mainactivity</code> which contains two tabs and has the following code:</p>
  
  <pre><code>public class MainActivity extends Activity {
      private class MyTabListener implements ActionBar.TabListener
      {
          private Fragment mFragment;
          private final Activity mActivity;
          private final String mFrag;
  
          public MyTabListener( Activity activity, String fragName )
          {
              mActivity = activity;
              mFrag = fragName;
          }
  
          @Override
          public void onTabReselected( Tab tab, FragmentTransaction ft )
          {
              // TODO Auto-generated method stub
  
          }
  
          @Override
          public void onTabSelected( Tab tab, FragmentTransaction ft )
          {
              mFragment = Fragment.instantiate( mActivity, mFrag );
              ft.add( android.R.id.content, mFragment );
          }
  
          @Override
          public void onTabUnselected( Tab tab, FragmentTransaction ft )
          {
              ft.remove( mFragment );
              mFragment = null;
          }
      }
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
  
          ActionBar ab = getActionBar();
          ab.setNavigationMode( ActionBar.NAVIGATION_MODE_TABS );
  
          Tab tab = ab.newTab()
                  .setText( "Current Trip" )
                  .setTabListener( 
                          new MyTabListener( this, current.class.getName() ) );
          ab.addTab( tab );
  
          tab = ab.newTab()
                  .setText( "Display Result" )
                  .setTabListener( 
                          new MyTabListener( this, display.class.getName() ) );
          ab.addTab( tab );
  
  
          File folder = new File(Environment.getExternalStorageDirectory() + "/tc");
          boolean success = true;
          if (!folder.exists()) {
              //Toast.makeText(MainActivity.this, "Directory Does Not Exist, Create It", Toast.LENGTH_SHORT).show();
              success = folder.mkdir();
          }
          if (success) {
              //Toast.makeText(MainActivity.this, "Directory Created", Toast.LENGTH_SHORT).show();
          } else {
              //Toast.makeText(MainActivity.this, "Failed - Error", Toast.LENGTH_SHORT).show();
          }
      }
  }
  </code></pre>
  
  <p>How do I pass data of a edittext from <code>current.class</code> to be shown and also used in <code>display.class</code> for calculation?</p>