I want a three column pane layout like Yatra.com app in which the sliding pane can slide from either left or right side. But SlidingPaneLayout only accepts two panes. When I try to put three fragments in there it doesn't show anything at all.
I tried changing the Sliding Pane Fragment with another view, but the solution is hacky and it doesn't slide from right at all. I got successful in having three panes using NavigationDrawer, but I don't want the pane to overlay the Main Fragment.
My question is, is it possible to have three panes using SLidingPaneLayout or should I try something else. If it's possible how can it be achieved? Am I missing something?
Use this library it has a demo on play store
Download all the libraries required by sliding drawer lib, download sample and see the Left and Right Activity it is similar to what you wanted...
The main code to set left and right drawer is this line:
getSlidingMenu().setMode(SlidingMenu.LEFT_RIGHT);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
setContentView(R.layout.content_frame);
And then populate the right fragment like this:
getSlidingMenu().setSecondaryMenu(R.layout.menu_frame_two);
getSlidingMenu().setSecondaryShadowDrawable(R.drawable.shadowright);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.menu_frame_two, new SampleListFragment())
.commit();