Home » Android » How to add fragments to Navigation Drawer template with 2 panes for tablets

How to add fragments to Navigation Drawer template with 2 panes for tablets

Posted by: admin November 1, 2017 Leave a comment

Questions:

I’ve gone through many tutorials explaining fragments. I can navigate between fragments via the Navigation Drawer or various other methods of data flow.

It seems, however, that the multiple pane example are few and far between. (ie. Master/Details panes on the same screen in the same activity.)

During startup of the Navigation Drawer template, activity_main is initialized then loads (includes) layout=”@layout/app_bar_main” and then proceeds on to load (include) which is the main content window in general.

I can’s seem to figure out where in the existing template I need to make adjustments to allow for a single fragment for Portrait views and multiple fragments for large/landscape views.

Any advice/examples are appreciated.

Answers: