use of de.madcyph3r.example.example.functionally.masterChildNavActivity.MasterFragment in project AdvancedMaterialDrawer by madcyph3r.
the class MasterChildNavActivity method init.
@Override
public void init(Bundle savedInstanceState) {
drawer = this;
// information text for the fragment
Bundle bundle = new Bundle();
bundle.putString("instruction", "This example shows a master child navigation. At the child in 'Master 2' you can open the menu with sliding." + "At the child in 'Master 1' the menu is locked. You can't open it.");
Fragment fragmentInstruction = new FragmentInstruction();
fragmentInstruction.setArguments(bundle);
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Instruction", fragmentInstruction, "Master Child Navigation"));
menu.add(new MaterialItemDevisor());
menu.add(new MaterialItemSectionFragment(this, "Master 1", new MasterFragment(), "Master 1"));
menu.add(new MaterialItemSectionFragment(this, "Master 2", new MasterFragment2(), "Master 2"));
// load menu
this.loadMenu(menu);
// load first MaterialItemSectionFragment in the menu, because there is no start position
this.loadStartFragmentFromMenu(menu);
}
Aggregations