use of rocks.tbog.tblauncher.TBApplication in project TBLauncher by TBog.
the class IconsHandler method changeIcon.
public void changeIcon(DialContactEntry dialContactEntry, Drawable drawable) {
Bitmap bitmap = getIconBitmap(ctx, drawable);
TBApplication app = TBApplication.getApplication(ctx);
app.getDataHandler().setCustomStaticEntryIcon(DialContactEntry.SCHEME, bitmap);
app.drawableCache().cacheDrawable(dialContactEntry.getIconCacheId(), null);
dialContactEntry.setCustomIcon();
app.drawableCache().cacheDrawable(dialContactEntry.getIconCacheId(), drawable);
}
use of rocks.tbog.tblauncher.TBApplication in project TBLauncher by TBog.
the class IconsHandler method restoreDefaultIcon.
public void restoreDefaultIcon(AppEntry appEntry) {
TBApplication app = TBApplication.getApplication(ctx);
app.getDataHandler().removeCustomAppIcon(appEntry.getUserComponentName());
app.drawableCache().cacheDrawable(appEntry.getIconCacheId(), null);
appEntry.clearCustomIcon();
}
use of rocks.tbog.tblauncher.TBApplication in project TBLauncher by TBog.
the class IconsHandler method changeIcon.
public void changeIcon(ShortcutEntry shortcutEntry, Drawable drawable) {
Bitmap bitmap = getIconBitmap(ctx, drawable);
TBApplication app = TBApplication.getApplication(ctx);
app.getDataHandler().setCustomStaticEntryIcon(shortcutEntry.id, bitmap);
app.drawableCache().cacheDrawable(shortcutEntry.getIconCacheId(), null);
shortcutEntry.setCustomIcon();
app.drawableCache().cacheDrawable(shortcutEntry.getIconCacheId(), drawable);
}
use of rocks.tbog.tblauncher.TBApplication in project TBLauncher by TBog.
the class IconsHandler method changeIcon.
public void changeIcon(SearchEntry searchEntry, Drawable drawable) {
Bitmap bitmap = getIconBitmap(ctx, drawable);
TBApplication app = TBApplication.getApplication(ctx);
app.getDataHandler().setCustomStaticEntryIcon(searchEntry.id, bitmap);
app.drawableCache().cacheDrawable(searchEntry.getIconCacheId(), null);
searchEntry.setCustomIcon();
app.drawableCache().cacheDrawable(searchEntry.getIconCacheId(), drawable);
}
use of rocks.tbog.tblauncher.TBApplication in project TBLauncher by TBog.
the class IconsHandler method restoreDefaultIcon.
public void restoreDefaultIcon(DialContactEntry dialContactEntry) {
TBApplication app = TBApplication.getApplication(ctx);
app.getDataHandler().removeCustomStaticEntryIcon(DialContactEntry.SCHEME);
app.drawableCache().cacheDrawable(dialContactEntry.getIconCacheId(), null);
dialContactEntry.clearCustomIcon();
}
Aggregations