Search in sources :

Example 1 with Iconable

use of com.mikepenz.materialdrawer.model.interfaces.Iconable in project MaterialDrawer by mikepenz.

the class Drawer method updateIcon.

/**
     * update the name for a specific drawerItem
     * identified by its id
     *
     * @param identifier
     * @param image
     */
public void updateIcon(long identifier, ImageHolder image) {
    IDrawerItem drawerItem = getDrawerItem(identifier);
    if (drawerItem instanceof Iconable) {
        Iconable pdi = (Iconable) drawerItem;
        pdi.withIcon(image);
        updateItem((IDrawerItem) pdi);
    }
}
Also used : IDrawerItem(com.mikepenz.materialdrawer.model.interfaces.IDrawerItem) Iconable(com.mikepenz.materialdrawer.model.interfaces.Iconable)

Aggregations

IDrawerItem (com.mikepenz.materialdrawer.model.interfaces.IDrawerItem)1 Iconable (com.mikepenz.materialdrawer.model.interfaces.Iconable)1