use of de.madcyph3r.example.example.FragmentDummy in project AdvancedMaterialDrawer by madcyph3r.
the class CustomHeaderActivity method init.
@Override
public void init(Bundle savedInstanceState) {
drawer = this;
// Important: see example_custom_header.xml . android:fitsSystemWindows="true" is important,
// otherwise the statusbar overlays the custom header
// information text for the fragment
Bundle bundle = new Bundle();
bundle.putString("instruction", "This example has an custom header in the drawer. " + "Call setCustomHeader(), to set your custom header.");
Fragment fragmentInstruction = new FragmentInstruction();
fragmentInstruction.setArguments(bundle);
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Instruction", fragmentInstruction, "Custom Header"));
menu.add(new MaterialItemSectionFragment(this, "Section 1", new FragmentDummy(), "Section 1"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
menu.add(new MaterialItemSectionFragment(this, "Section 3", new FragmentDummy(), "Section 3"));
// load menu
this.loadMenu(menu);
// load the MaterialItemSectionFragment, from the given startIndex
this.loadStartFragmentFromMenu(menu);
// create and set the recycleview_header
View view = LayoutInflater.from(this).inflate(R.layout.example_custom_header, null);
this.setCustomHeader(view, 150);
}
use of de.madcyph3r.example.example.FragmentDummy in project AdvancedMaterialDrawer by madcyph3r.
the class CustomHeaderBelowToolbarActivity method init.
@Override
public void init(Bundle savedInstanceState) {
drawer = this;
// Important: see example_custom_header.xml . android:fitsSystemWindows="true" is important,
// otherwise the statusbar overlays the custom header
// information text for the fragment
Bundle bundle = new Bundle();
bundle.putString("instruction", "This example has an custom header in the drawer. " + "The drawer is shown under the toolbar. " + "Call setCustomHeader(), to set your custom header.");
Fragment fragmentInstruction = new FragmentInstruction();
fragmentInstruction.setArguments(bundle);
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Instruction", fragmentInstruction, "Custom Header Below Toolbar"));
menu.add(new MaterialItemSectionFragment(this, "Section 1", new FragmentDummy(), "Section 1"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
menu.add(new MaterialItemSectionFragment(this, "Section 3", new FragmentDummy(), "Section 3"));
// load menu
this.loadMenu(menu);
// load the MaterialItemSectionFragment, from the given startIndex
this.loadStartFragmentFromMenu(menu);
// create and set the recycleview_header
View view = LayoutInflater.from(this).inflate(R.layout.example_custom_header_below_toolbar, null);
this.setCustomHeader(view, 150);
}
use of de.madcyph3r.example.example.FragmentDummy in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveActivity method getHeadItem4.
private MaterialHeadItem getHeadItem4() {
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head 4)", new FragmentDummy(), "Section 1 (Head 4)"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
// create Head Item
TextDrawable headPhoto = TextDrawable.builder().buildRound("D", Color.GRAY);
MaterialHeadItem headItem = new MaterialHeadItem(this, "D HeadItem", "D Subtitle", headPhoto, R.drawable.mat6, menu);
return headItem;
}
use of de.madcyph3r.example.example.FragmentDummy in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveActivity method getHeadItem5.
private MaterialHeadItem getHeadItem5() {
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head 5)", new FragmentDummy(), "Section 1 (Head 5)"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
// create Head Item
TextDrawable headPhoto = TextDrawable.builder().buildRound("E", Color.GRAY);
MaterialHeadItem headItem = new MaterialHeadItem(this, "E HeadItem", "E Subtitle", headPhoto, R.drawable.mat6, menu);
return headItem;
}
use of de.madcyph3r.example.example.FragmentDummy in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveActivity method getHeadItem3.
private MaterialHeadItem getHeadItem3() {
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head 3)", new FragmentDummy(), "Section 1 (Head 3)"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
// create Head Item
TextDrawable headPhoto = TextDrawable.builder().buildRound("C", Color.GRAY);
MaterialHeadItem headItem = new MaterialHeadItem(this, "C HeadItem", "C Subtitle", headPhoto, R.drawable.mat6, menu);
return headItem;
}
Aggregations