mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic icons which can be loaded on the background thread instead of going through IconFactory which runs on UiThread Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
This commit is contained in:
@@ -289,7 +289,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
private void applyIconAndLabel(ItemInfoWithIcon info) {
|
||||
FastBitmapDrawable iconDrawable = DrawableFactory.INSTANCE.get(getContext())
|
||||
.newIcon(getContext(), info);
|
||||
mDotParams.color = IconPalette.getMutedColor(info.iconColor, 0.54f);
|
||||
mDotParams.color = IconPalette.getMutedColor(info.bitmap.color, 0.54f);
|
||||
|
||||
setIcon(iconDrawable);
|
||||
setText(info.title);
|
||||
@@ -665,7 +665,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
mDisableRelayout = true;
|
||||
|
||||
// Optimization: Starting in N, pre-uploads the bitmap to RenderThread.
|
||||
info.iconBitmap.prepareToDraw();
|
||||
info.bitmap.icon.prepareToDraw();
|
||||
|
||||
if (info instanceof AppInfo) {
|
||||
applyFromApplicationInfo((AppInfo) info);
|
||||
|
||||
Reference in New Issue
Block a user