use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.
the class AddRemoveHeadItemRuntimeActivity method getHeadItem2.
private MaterialHeadItem getHeadItem2() {
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Section 1", this.getResources().getDrawable(R.drawable.ic_favorite_black_36dp), new FragmentDummy(), "Section 1"));
menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
// create headItem
TextDrawable headPhoto = TextDrawable.builder().buildRound("B", Color.BLUE);
MaterialHeadItem headItem = new MaterialHeadItem(this, "B HeadItem No Menu", "B Subtitle", headPhoto, R.drawable.mat6, menu);
return headItem;
}
use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.
the class AddRemoveHeadItemRuntimeActivity method getHeadItem3.
private MaterialHeadItem getHeadItem3() {
// create menu
MaterialMenu menu = new MaterialMenu();
menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head " + headCount + ")", this.getResources().getDrawable(R.drawable.ic_favorite_black_36dp), new FragmentDummy(), "Section 1 (Head " + headCount + ")"));
menu.add(new MaterialItemSectionFragment(this, "Section 2 (Head " + headCount + ")", new FragmentDummy(), "Section 2 (Head " + headCount + ")"));
// create headItem
TextDrawable headPhoto = TextDrawable.builder().buildRound(headCount + "", Color.BLUE);
MaterialHeadItem headItem = new MaterialHeadItem(this, headCount + " HeadItem No Menu", headCount + " Subtitle", headPhoto, R.drawable.mat6, menu);
// counter for the new headItem
headCount++;
return headItem;
}
use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveDontCloseOnChangeActivity 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);
// don't close the drawer, if this head item chosen
headItem.setCloseDrawerOnChanged(false);
return headItem;
}
use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveDontCloseOnChangeActivity 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);
// don't close the drawer, if this head item chosen
headItem.setCloseDrawerOnChanged(false);
return headItem;
}
use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemFiveDontCloseOnChangeActivity 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);
// don't close the drawer, if this head item chosen
headItem.setCloseDrawerOnChanged(false);
return headItem;
}
Aggregations