title: Recursive entry to executePendingTransactions, even with getChildFragmentManager
body: <p>I have an activity with a viewpager that contains 3 fragments.
  In one of the 3 fragments I have another viewpager, now I learned that when you want te embed a fragment in a fragment you gotta use getChildFragmentManager but for some reason it doesn't work with me.</p>
  
  <p>I have an activity:
  HomeActivity</p>
  
  <p>And 3 fragments, one of them:
  ProfileFragment</p>
  
  <p>In here I use this for my viewpager:</p>
  
  <pre><code>// Creating The ViewPagerAdapter and Passing Fragment Manager, Titles fot the Tabs and Number Of Tabs.
          adapter =  new ViewPagerProfileAdapter(getChildFragmentManager(),Titles,Numboftabs);
  
          // Assigning ViewPager View and setting the adapter
          pager = (ViewPager) getActivity().findViewById(R.id.pager);
          pager.setAdapter(adapter);
  
          // Assiging the Sliding Tab Layout View
          tabs = (SlidingTabLayout) getActivity().findViewById(R.id.tabs);
          tabs.setDistributeEvenly(true); // To make the Tabs Fixed set this true, This makes the tabs Space Evenly in Available width
  
          // Setting Custom Color for the Scroll bar indicator of the Tab View
          tabs.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() {
              @Override
              public int getIndicatorColor(int position) {
                  return getResources().getColor(R.color.white);
              }
          });
  
          // Setting the ViewPager For the SlidingTabsLayout
          tabs.setViewPager(pager);
  </code></pre>
  
  <p>This is the ViewPagerProfileAdapter:</p>
  
  <pre><code>public class ViewPagerProfileAdapter extends FragmentStatePagerAdapter {
  
      CharSequence Titles[]; // This will Store the Titles of the Tabs which are Going to be passed when ViewPagerAdapter is created
      int NumbOfTabs; // Store the number of tabs, this will also be passed when the ViewPagerAdapter is created
  
  
      // Build a Constructor and assign the passed Values to appropriate values in the class
      public ViewPagerProfileAdapter(FragmentManager fm,CharSequence mTitles[], int mNumbOfTabsumb) {
          super(fm);
  
          this.Titles = mTitles;
          this.NumbOfTabs = mNumbOfTabsumb;
  
      }
  
      //This method return the fragment for the every position in the View Pager
      @Override
      public Fragment getItem(int position) {
  
          if(position == 0) // if the position is 0 we are returning the First tab
          {
              EventsFragment tab1 = new EventsFragment();
              return tab1;
          }
          else           // As we are having 3 tabs if the position is now 0 it must be 1 so we are returning second tab
          {
              AttendsFragment tab2 = new AttendsFragment();
              return tab2;
          }
  
  
      }
  
      // This method return the titles for the Tabs in the Tab Strip
  
      @Override
      public CharSequence getPageTitle(int position) {
          return Titles[position];
      }
  
      // This method return the Number of tabs for the tabs Strip
  
      @Override
      public int getCount() {
          return NumbOfTabs;
      }
  }
  </code></pre>
  
  <p>I still get this error:</p>
  
  <pre><code>03-13 14:09:02.150    5040-5040/com.laurenswuyts.witpa E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.laurenswuyts.witpa, PID: 5040
      java.lang.IllegalStateException: Recursive entry to executePendingTransactions
              at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1461)
              at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:486)
              at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
              at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:420)
              at com.laurenswuyts.witpa.Fragments.Profile.ProfileFragment.onActivityCreated(ProfileFragment.java:206)
              at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1794)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:967)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
              at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
              at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
              at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:486)
              at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
              at android.support.v4.view.ViewPager.populate(ViewPager.java:1073)
              at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
              at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1896)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2059)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
              at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
              at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2314)
              at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1692)
              at android.app.Activity.dispatchTouchEvent(Activity.java:2739)
              at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2275)
              at android.view.View.dispatchPointerEvent(View.java:8578)
              at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4021)
              at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3887)
              at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
              at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
              at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
              at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3578)
              at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
              at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3635)
              at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
              at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
              at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
              at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
              at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
              at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5701)
              at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5675)
              at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5646)
              at android.view.ViewRoot
  </code></pre>
  
  <p>Line 206 is pager.setAdapter(adapter);</p>