title: Passing String from FragmentActivity to Fragment
body: <p>I am able to get String in FragmentActivity from Activity. However, how do I pass on my data from FragmentActivity to Fragments? I am able to get my data in FragmentActivity though.</p>
  
  <p>(I do not want to store data in SharedPreferences.)</p>
  
  <pre><code>public class IndividualDetailsActivity extends IndividualBasePager {
  
      ViewPager mPager;
      IndividualDetailsBaseAdapter mAdapter;
      TitlePageIndicator mIndicator;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.individual_pager);
          mAdapter = new IndividualDetailsBaseAdapter(getSupportFragmentManager());
          mPager = (ViewPager) findViewById(R.id.pager);
          mPager.setOffscreenPageLimit(4);
          mPager.setAdapter(mAdapter);
          mIndicator = (TitlePageIndicator) findViewById(R.id.indicator);
          mIndicator.setViewPager(mPager);
          mIndicator.setCurrentItem(1);
          Intent i = getIntent();
          getSupportActionBar().setTitle(i.getStringExtra("name"));
      }
  }
  
  public class IndividualBasePager extends SherlockFragmentActivity {
      IndividualDetailsBaseAdapter mAdapter;
      ViewPager mPager;
      PageIndicator mIndicator;
  
      @Override
      protected void onCreate(Bundle arg0) {
          super.onCreate(arg0);
          requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
          setTheme(R.style.Theme_Sherlock_Light_DarkActionBar);
          ActionBar actionbar = getSupportActionBar();
          actionbar.setDisplayHomeAsUpEnabled(true);
          setSupportProgressBarIndeterminateVisibility(true);
      }
  
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          if (item.getItemId() == android.R.id.home) {
              finish();
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  
  
  public class IndividualDetailsBaseAdapter extends FragmentPagerAdapter {
      protected static final String[] CONTENT = new String[] { "Comments",
              "Details", "Screens", "Tutorial" };
  
      private int mCount = CONTENT.length;
  
      public IndividualDetailsBaseAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public Fragment getItem(int position) {
          Log.e("PAGE", "Position " + position);
          switch (position) {
          case 0:
              return new CommentsFragment();
          case 1:
              return new DetailsFragment();
          case 2:
              return new CommentsFragment();
          case 3:
              return new CommentsFragment();
          }
          return null;
      }
  
      @Override
      public int getCount() {
          return mCount;
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          return IndividualDetailsBaseAdapter.CONTENT[position % CONTENT.length];
      }
  
      public void setCount(int count) {
          if (count &gt; 0 &amp;&amp; count &lt;= 10) {
              mCount = count;
              notifyDataSetChanged();
          }
      }
  }
  </code></pre>