sprockets/src/main/java/net/sf/sprockets/app/ui/PanesActivity.java
@SuppressWarnings("ConstantConditions")
    public void setContentView(@LayoutRes int layoutId, @IdRes int pagerId, @IdRes int pane1Id,
                               @IdRes int pane2Id) {
        setContentView(layoutId);
        Fragment pane1 = findFragmentByPane(1);
        Fragment pane2 = findFragmentByPane(2);
        ViewPager pager = (ViewPager) findViewById(pagerId);
        /* do we need to move the fragments between the single and multi-pane layouts? */
        FragmentManager fm = getFragmentManager();
        FragmentTransaction ft = null;
        if (pane2 == null) {
            pane2 = getFragment(2);
        } else if (pane2.getId() != (pager != null ? pagerId : pane2Id)) {
            ft = fm.beginTransaction().remove(pane2); // remove in reverse to preserve indices
        }
        if (pane1 == null) {
            pane1 = getFragment(1);
        } else if (pane1.getId() != (pager != null ? pagerId : pane1Id)) {
            if (ft == null) {
                ft = fm.beginTransaction();
            }
            ft.remove(pane1);
        }
        if (ft != null) {
            ft.commitAllowingStateLoss();
            fm.executePendingTransactions(); // force removes so can add to a different container
        }
        /* add the fragments to the panes */
        if (pager != null) {
            pager.setAdapter(new PanesAdapter(pane1, pane2));
        } else {
            ft = null;
            if (pane1.getId() != pane1Id) {
                ft = Fragments.open(this).add(pane1Id, pane1, PANE_1);
            }
            if (pane2.getId() != pane2Id) {
                if (ft == null) {
                    ft = Fragments.open(this);
                }
                ft.add(pane2Id, pane2, PANE_2);
            }
            if (ft != null) {
                ft.commitAllowingStateLoss();
            }
        }
    }
@SuppressWarnings("ConstantConditions")
    public void setContentView(@LayoutRes int layoutId, @IdRes int pagerId, @IdRes int pane1Id,
                               @IdRes int pane2Id) {
        setContentView(layoutId);
        Fragment pane1 = findFragmentByPane(1);
        Fragment pane2 = findFragmentByPane(2);
        ViewPager pager = (ViewPager) findViewById(pagerId);
        /* do we need to move the fragments between the single and multi-pane layouts? */
        FragmentManager fm = getFragmentManager();
        FragmentTransaction ft = null;
        if (pane2 == null) {
            pane2 = getFragment(2);
        } else if (pane2.getId() != (pager != null ? pagerId : pane2Id)) {
            ft = fm.beginTransaction().remove(pane2); // remove in reverse to preserve indices
        }
        if (pane1 == null) {
            pane1 = getFragment(1);
        } else if (pane1.getId() != (pager != null ? pagerId : pane1Id)) {
            if (ft == null) {
                ft = fm.beginTransaction();
            }
            ft.remove(pane1);
        }
        if (ft != null) {
            ft.commitAllowingStateLoss();
            fm.executePendingTransactions(); // force removes so can add to a different container
        }
        /* add the fragments to the panes */
        if (pager != null) {
            pager.setAdapter(new PanesAdapter(pane1, pane2));
        } else {
            ft = null;
            if (pane1.getId() != pane1Id) {
                ft = Fragments.open(this).add(pane1Id, pane1, PANE_1);
            }
            if (pane2.getId() != pane2Id) {
                if (ft == null) {
                    ft = Fragments.open(this);
                }
                ft.add(pane2Id, pane2, PANE_2);
            }
            if (ft != null) {
                ft.commitAllowingStateLoss();
            }
        }
    }
Use your own layout for the panes.

@param pagerId ViewPager in the single pane layout
@param pane1Id first pane in the multi-pane layout
@param pane2Id second pane in the multi-pane layout