FragmentPagerSupport is a FragmentActivity class, FragmentA and FragmentB are representing 2 different tabs. In the First tab I have a EditText and a button. My task is to o
Assuming your ViewPager is named mPager:
public void onClick(View view)
{
mPager.setCurrentItem(1); // Change to page 1, i.e., FragmentB
}
I would suggest reading this training page in detail. It goes into some of the strategies used to pass information from Fragment to Fragment (generally by having the Activity implement an interface that the Fragment can then call).
It really depends on how coupled you want your Fragments to be. You could certainly use something like
((FragmentB)getActivity().getSupportFragmentManager().findFragmentByTag(
"android:switcher:" + pager.getId() + ":1")).setExitText(text)
to pass the text from FragmentA to FragmentB, but that tightly couples your Fragments to each other and to the ViewPager the Activity contains.
I would suggest