Search in sources :

Example 16 with TextDrawable

use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.

the class HeadItemThreeActivity 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;
}
Also used : TextDrawable(com.amulyakhare.textdrawable.TextDrawable) MaterialItemSectionFragment(de.madcyph3r.materialnavigationdrawer.menu.item.section.MaterialItemSectionFragment) MaterialMenu(de.madcyph3r.materialnavigationdrawer.menu.MaterialMenu) MaterialHeadItem(de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem) FragmentDummy(de.madcyph3r.example.example.FragmentDummy)

Example 17 with TextDrawable

use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.

the class HeadItemThreeChangeListenerActivity 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;
}
Also used : TextDrawable(com.amulyakhare.textdrawable.TextDrawable) MaterialItemSectionFragment(de.madcyph3r.materialnavigationdrawer.menu.item.section.MaterialItemSectionFragment) MaterialMenu(de.madcyph3r.materialnavigationdrawer.menu.MaterialMenu) MaterialHeadItem(de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem) FragmentDummy(de.madcyph3r.example.example.FragmentDummy)

Example 18 with TextDrawable

use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.

the class HeadItemTwoExtraMenuActivity method getHeadItem2.

private MaterialHeadItem getHeadItem2() {
    // create menu
    MaterialMenu menu = new MaterialMenu();
    menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head 2)", new FragmentDummy(), "Section 1 (Head 2)"));
    menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
    // create Head Item
    TextDrawable headPhoto = TextDrawable.builder().buildRound("B", Color.BLUE);
    MaterialHeadItem headItem = new MaterialHeadItem(this, "B HeadItem", "B Subtitle", headPhoto, R.drawable.mat6, menu);
    return headItem;
}
Also used : TextDrawable(com.amulyakhare.textdrawable.TextDrawable) MaterialItemSectionFragment(de.madcyph3r.materialnavigationdrawer.menu.item.section.MaterialItemSectionFragment) MaterialMenu(de.madcyph3r.materialnavigationdrawer.menu.MaterialMenu) MaterialHeadItem(de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem) FragmentDummy(de.madcyph3r.example.example.FragmentDummy)

Example 19 with TextDrawable

use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.

the class HeadItemTwoOnlyOneHasMenuActivity method getHeadItem2.

// head item 2 has no menu You can use this for an avatar click
private MaterialHeadItem getHeadItem2() {
    // create Head Item
    TextDrawable headPhoto = TextDrawable.builder().buildRound("B", Color.BLUE);
    MaterialHeadItem headItem = new MaterialHeadItem(this, "B HeadItem", "B Subtitle", headPhoto, R.drawable.mat6);
    // don't change fragment on change, because there is no menu. Or you get an exception
    headItem.setLoadFragmentOnChanged(false);
    return headItem;
}
Also used : TextDrawable(com.amulyakhare.textdrawable.TextDrawable) MaterialHeadItem(de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem)

Example 20 with TextDrawable

use of com.amulyakhare.textdrawable.TextDrawable in project AdvancedMaterialDrawer by madcyph3r.

the class HeadItemFiveActivity method getHeadItem2.

private MaterialHeadItem getHeadItem2() {
    // create menu
    MaterialMenu menu = new MaterialMenu();
    menu.add(new MaterialItemSectionFragment(this, "Section 1 (Head 2)", new FragmentDummy(), "Section 1 (Head 2)"));
    menu.add(new MaterialItemSectionFragment(this, "Section 2", new FragmentDummy(), "Section 2"));
    // create Head Item
    TextDrawable headPhoto = TextDrawable.builder().buildRound("B", Color.BLUE);
    MaterialHeadItem headItem = new MaterialHeadItem(this, "B HeadItem", "B Subtitle", headPhoto, R.drawable.mat6, menu);
    return headItem;
}
Also used : TextDrawable(com.amulyakhare.textdrawable.TextDrawable) MaterialItemSectionFragment(de.madcyph3r.materialnavigationdrawer.menu.item.section.MaterialItemSectionFragment) MaterialMenu(de.madcyph3r.materialnavigationdrawer.menu.MaterialMenu) MaterialHeadItem(de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem) FragmentDummy(de.madcyph3r.example.example.FragmentDummy)

Aggregations

TextDrawable (com.amulyakhare.textdrawable.TextDrawable)26 MaterialHeadItem (de.madcyph3r.materialnavigationdrawer.head.MaterialHeadItem)23 FragmentDummy (de.madcyph3r.example.example.FragmentDummy)22 MaterialMenu (de.madcyph3r.materialnavigationdrawer.menu.MaterialMenu)22 MaterialItemSectionFragment (de.madcyph3r.materialnavigationdrawer.menu.item.section.MaterialItemSectionFragment)22 AnimationDrawable (android.graphics.drawable.AnimationDrawable)2 Drawable (android.graphics.drawable.Drawable)1 InsetDrawable (android.graphics.drawable.InsetDrawable)1 LayerDrawable (android.graphics.drawable.LayerDrawable)1 View (android.view.View)1 BindView (butterknife.BindView)1 FloatingActionButton (com.getbase.floatingactionbutton.FloatingActionButton)1 BaseView (pri.weiqiang.myjapanese.mvp.view.BaseView)1 SwipeFlingAdapterView (pri.weiqiang.myjapanese.widget.swipecardview.SwipeFlingAdapterView)1