如何在自定义启动器上安装图标包?
2022-09-02 04:46:29
我正在尝试在我的自定义启动器上安装图标包,我已经阅读了此注释 如何安装图标包,但我无法了解如何使用该类,以下是我所做的:
IconPackManager ic = new IconPackManager();
HashMap<String, IconPackManager.IconPack> map = new HashMap<String, IconPackManager.IconPack>(ic.getAvailableIconPacks(false));
Iterator it = map.entrySet().iterator();
Drawable d = null;
String packName = null;
IconPackManager.IconPack packIcon = null;
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next();
packName = (String)pair.getKey();
packIcon = (IconPackManager.IconPack)pair.getValue();
d = packIcon.getDrawableIconForPackage(packName, iconDrawable);
setIcon(d);
}