.withName(mMenuItem.getTitle().toString()) .withIcon(mMenuItem.getIcon()) .withIdentifier(mMenuItem.getItemId()) .withEnabled(mMenuItem.isEnabled()); getItemAdapter().add(iDrawerItem);
new SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog).withIdentifier(10), new SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github)
new SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), new SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), new SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github).withBadge("12").withIdentifier(3), new SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn)
new SecondaryDrawerItem().withName("CollapsableItem").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_format_bold).withIdentifier(2000), new SecondaryDrawerItem().withName("CollapsableItem 2").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_format_bold).withIdentifier(2001) ), new ExpandableDrawerItem().withName("Collapsable").withIcon(GoogleMaterial.Icon.gmd_filter_list).withIdentifier(19).withSelectable(false).withSubItems( new SecondaryDrawerItem().withName("CollapsableItem").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_filter_list).withIdentifier(2002), new SecondaryDrawerItem().withName("CollapsableItem 2").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_filter_list).withIdentifier(2003) ), new SectionDrawerItem().withName(R.string.drawer_item_section_header), new SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github).withIdentifier(20).withSelectable(false), new SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withIdentifier(21).withTag("Bullhorn")
/** * @param context for resource retrieval * @param di drawer type * @param i identifier for drawer item */ public static SecondaryDrawerItem getSecondaryDrawerItem(final Context context, DrawerItem di, int i) { return new SecondaryDrawerItem().withName(context.getResources().getString( di.getTitleID())).withIdentifier(i); }
private SecondaryDrawerItem secondaryDrawerItemForClass(AppCompatActivity activeActivity, Class<?> targetActivityClass, @StringRes int targetActivityTitleRessource, @DrawableRes int iconResource) { return new SecondaryDrawerItem() .withName(activeActivity.getString(targetActivityTitleRessource)) .withIcon(iconResource ) .withIconColorRes(COLOR_ICON_SECONDARY) .withSelectedIconColorRes(COLOR_ICON_SECONDARY_ACTIVE) .withIconTintingEnabled(true) .withTag(targetActivityClass) .withSelectable(false) .withIdentifier(targetActivityClass.hashCode()); }
.withName(mMenuItem.getTitle().toString()) .withIcon(mMenuItem.getIcon()) .withIdentifier(mMenuItem.getItemId()) .withEnabled(mMenuItem.isEnabled()); getAdapter().addDrawerItems(iDrawerItem);
new PrimaryDrawerItem().withName(R.string.drawer_item_sixth).withIcon(MaterialDesignIconic.Icon.gmi_car).withIdentifier(6), new DividerDrawerItem(), new SecondaryDrawerItem().withName(R.string.drawer_item_seventh).withIcon(FontAwesome.Icon.faw_github).withIdentifier(7).withSelectable(false)