Fragment transcation in View Pager
<p>In my application I'm using viewpager and fragments..</p>

<p>My application two page is there. Page A and Page B</p>

<p>When i click on page A next button its should go to PageA.1 fragment.</p>

<p>But right now transaction is going on but only when getting blank screen..</p>

<p>My transaction code looks as follows:</p>

<pre><code>FragmentCheck check=new FragmentCheck();

FragmentTransaction transaction=getFragmentManager().beginTransaction();

transaction.addToBackStack(null);
transaction.replace(R.id.pager, check).commit();
</code></pre>

<p>My FragmentPageAdapter class</p>

<pre><code>public class TabsAdapter extends FragmentPagerAdapter implements
ActionBar.TabListener, ViewPager.OnPageChangeListener
{
private final Context mContext;
private final ActionBar mActionBar;
private final ViewPager mViewPager;
private final ArrayList&lt;TabInfo&gt; mTabs = new ArrayList&lt;TabInfo&gt;();

static final class TabInfo
{
private final Class&lt;?&gt; clss;
private final Bundle args;

TabInfo(Class&lt;?&gt; _class, Bundle _args)
{
    clss = _class;
    args = _args;
}
}

public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager)
{
super(activity.getSupportFragmentManager());
mContext = activity;
mActionBar = activity.getSupportActionBar();
mViewPager = pager;
mViewPager.setAdapter(this);
mViewPager.setOnPageChangeListener(this);
}

public void addTab(ActionBar.Tab tab, Class&lt;?&gt; clss, Bundle args)
{
TabInfo info = new TabInfo(clss, args);
tab.setTag(info);
tab.setTabListener(this);
mTabs.add(info);
mActionBar.addTab(tab);
notifyDataSetChanged();
}

@Override
public int getCount()
{
return mTabs.size();
}

@Override
public Fragment getItem(int position)
{
TabInfo info = mTabs.get(position);
return Fragment.instantiate(mContext, info.clss.getName(),
                info.args);
}

@Override
public void onPageScrolled(int position, float positionOffset,
        int positionOffsetPixels)
{
}

@Override
public void onPageSelected(int position)
{
mActionBar.setSelectedNavigationItem(position);
}

@Override
public void onPageScrollStateChanged(int state)
{
}

@Override
public void onTabSelected(Tab tab, FragmentTransaction ft)
{
Object tag = tab.getTag();
for (int i = 0; i &lt; mTabs.size(); i++)
{
        if (mTabs.get(i) == tag)
        {
                mViewPager.setCurrentItem(i);
        }
}
}

@Override
    public void notifyDataSetChanged() {
        // TODO Auto-generated method stub
        super.notifyDataSetChanged();

        Log.i("dempo", "Hi here");
    }

@Override
public void onTabUnselected(Tab tab, FragmentTransaction ft)
{ }
@Override
public void onTabReselected(Tab tab, FragmentTransaction ft)
{ }

}
</code></pre>
