use of com.mikepenz.materialdrawer.model.MiniProfileDrawerItem in project MaterialDrawer by mikepenz.
the class MiniDrawer method generateMiniDrawerItem.
/**
* generates a MiniDrawerItem from a IDrawerItem
*
* @param drawerItem
* @return
*/
public IDrawerItem generateMiniDrawerItem(IDrawerItem drawerItem) {
if (drawerItem instanceof SecondaryDrawerItem) {
return mIncludeSecondaryDrawerItems ? new MiniDrawerItem((SecondaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground) : null;
} else if (drawerItem instanceof PrimaryDrawerItem) {
return new MiniDrawerItem((PrimaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground);
} else if (drawerItem instanceof ProfileDrawerItem) {
MiniProfileDrawerItem mpdi = new MiniProfileDrawerItem((ProfileDrawerItem) drawerItem);
mpdi.withEnabled(mEnableProfileClick);
return mpdi;
}
return null;
}
Aggregations