I made a horizontal slider with the FragmentPagerAdapter letting the
user to smoothly scroll through views.
The Fragment classess I am using used to be Activity classes. The code
looks like this how I added these classes to the slider:

...
   private void initialisePaging() {

      List<Fragment> fragments = new Vector<Fragment>();
      fragments.add(Fragment.instantiate(this,
Fragment1.class.getName()));
      fragments.add(Fragment.instantiate(this,
Fragment12.class.getName()));

      this.mPagerAdapter = new
MyPagerAdapter(super.getSupportFragmentManager(), fragments);

      ViewPager pager = (ViewPager)
super.findViewById(R.id.viewpager);
      pager.setAdapter(this.mPagerAdapter);
   }
...

The slider itself works without any problems. What I can not figure
out is how I can send data to the Fragment1 and Fragment2 classes how
I used to do that do with "intent"
intent = getIntent();
...when those classes were extending "Activity". I have some Strings I
need to pass to Fragment1 and Fragment2 from the previous views.
How can I do that?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to