title: Call methods of fragment from sherlock fragment activity
body: <p>I am developing an app with action bar sherlock.
  In Sherlock fragment activity i added two fragments </p>
  
  <pre><code>public class My Project extends SherlockFragmentActivity implements ActionBar.TabListener{
  
    ViewPager mViewPager;
    SectionsPagerAdapter mSectionsPagerAdapter;
  
    @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setTheme(R.style.MyTheme);
          setContentView(R.layout.main);      
  
      final ActionBar actionBar = getSupportActionBar();
      actionBar.setTitle("My Project");
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
  
         List&lt;Fragment&gt; fragments = new Vector&lt;Fragment&gt;();
      fragments.add(Fragment.instantiate(this, MainSettinngs.class.getName()));
      fragments.add(Fragment.instantiate(this, OtherSettings.class.getName()));
  
         // Create the adapter that will return a fragment for each of the two
      // primary sections of the app.
      mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager(),fragments,this);
  
      // Set up the ViewPager with the sections adapter.
      mViewPager = (ViewPager) findViewById(R.id.pager);
      mViewPager.setAdapter(mSectionsPagerAdapter);
  
      // When swiping between different sections, select the corresponding
      // tab. We can also use ActionBar.Tab#select() to do this if we have
      // a reference to the Tab.
      mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
                  @Override
                  public void onPageSelected(int position) {
                      actionBar.setSelectedNavigationItem(position);
                  }
              });
  
      // For each of the sections in the app, add a tab to the action bar.
      actionBar.addTab(actionBar.newTab().setText(getString(R.string.title_main_settings)).setTabListen(this));
      actionBar.addTab(actionBar.newTab().setText(getString(R.string.title_other_settings)).setTabListener(this));
  
  }
  
    @Override
  public void onTabSelected(ActionBar.Tab tab,
          FragmentTransaction fragmentTransaction) {
      // When the given tab is selected, switch to the corresponding page in
      // the ViewPager.
      mViewPager.setCurrentItem(tab.getPosition());
  }
  
  @Override
  public void onTabUnselected(ActionBar.Tab tab,
          FragmentTransaction fragmentTransaction) {
  }
  
  @Override
  public void onTabReselected(ActionBar.Tab tab,
          FragmentTransaction fragmentTransaction) {
  }
  
   }
  </code></pre>
  
  <p>and SectionsPagerAdapter</p>
  
  <pre><code> public class SectionsPagerAdapter extends FragmentPagerAdapter {
  
  private List&lt;Fragment&gt; fragments;
  Context _context;
  
  public SectionsPagerAdapter(FragmentManager fm,List&lt;Fragment&gt; fragments,Context context) {
      super(fm);
      this.fragments = fragments;
      _context = context;
  }
  
  @Override
  public Fragment getItem(int position) {
      // getItem is called to instantiate the fragment for the given page.
      // Return a DummySectionFragment (defined as a static inner class
      // below) with the page number as its lone argument.
      return this.fragments.get(position);
  }
  
  @Override
  public int getCount() {
      return this.fragments.size();
  }
     }
  </code></pre>
  
  <p>With these i have two fragments MainSettings and OtherSettings which extends support fragment class.</p>
  
  <p>In my Sherlock fragment activity i want current objects of the MainSettings  and  OtherSettings so that i can</p>
  
  <ol>
  <li>call a method of it from my Sherlock fragment activity</li>
  </ol>