本文整理匯總了Java中com.mikepenz.materialdrawer.model.interfaces.Iconable類的典型用法代碼示例。如果您正苦於以下問題:Java Iconable類的具體用法?Java Iconable怎麽用?Java Iconable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Iconable類屬於com.mikepenz.materialdrawer.model.interfaces包,在下文中一共展示了Iconable類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateIcon
import com.mikepenz.materialdrawer.model.interfaces.Iconable; //導入依賴的package包/類
/**
* 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);
}
}
示例2: updateIcon
import com.mikepenz.materialdrawer.model.interfaces.Iconable; //導入依賴的package包/類
/**
* update the name for a specific drawerItem
* identified by its id
*
* @param identifier
* @param image
*/
public void updateIcon(int identifier, ImageHolder image) {
IDrawerItem drawerItem = getDrawerItem(identifier);
if (drawerItem instanceof Iconable) {
Iconable pdi = (Iconable) drawerItem;
pdi.withIcon(image);
updateItem((IDrawerItem) pdi);
}
}