Loading src/com/android/launcher3/BubbleTextView.java +10 −4 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import com.android.launcher3.model.data.SearchActionItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.util.SafeCloseable; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.BubbleTextHolder; import com.android.launcher3.views.IconLabelDotView; import java.text.NumberFormat; Loading Loading @@ -163,6 +162,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, private HandlerRunnable mIconLoadRequest; private boolean mEnableIconUpdateAnimation = false; private ItemInfoUpdateReceiver mItemInfoUpdateReceiver; public BubbleTextView(Context context) { this(context, null, 0); Loading Loading @@ -240,6 +240,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, mDotParams.scale = 0f; mForceHideDot = false; setBackground(null); mItemInfoUpdateReceiver = null; } private void cancelDotScaleAnim() { Loading Loading @@ -337,13 +338,18 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, setDownloadStateContentDescription(info, info.getProgressLevel()); } private void setItemInfo(ItemInfo itemInfo) { private void setItemInfo(ItemInfoWithIcon itemInfo) { setTag(itemInfo); if (getParent() instanceof BubbleTextHolder) { ((BubbleTextHolder) getParent()).onItemInfoChanged(itemInfo); if (mItemInfoUpdateReceiver != null) { mItemInfoUpdateReceiver.reapplyItemInfo(itemInfo); } } public void setItemInfoUpdateReceiver( ItemInfoUpdateReceiver itemInfoUpdateReceiver) { mItemInfoUpdateReceiver = itemInfoUpdateReceiver; } @UiThread protected void applyIconAndLabel(ItemInfoWithIcon info) { boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER Loading src/com/android/launcher3/views/BubbleTextHolder.java +5 −3 Original line number Diff line number Diff line Loading @@ -16,12 +16,14 @@ package com.android.launcher3.views; import com.android.launcher3.BubbleTextView; import com.android.launcher3.icons.IconCache; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.ItemInfoWithIcon; /** * Views that contain {@link BubbleTextView} should implement this interface. */ public interface BubbleTextHolder { public interface BubbleTextHolder extends IconCache.ItemInfoUpdateReceiver { BubbleTextView getBubbleText(); /** Loading @@ -29,6 +31,6 @@ public interface BubbleTextHolder { * * @param itemInfo the new itemInfo */ default void onItemInfoChanged(ItemInfo itemInfo) { } @Override default void reapplyItemInfo(ItemInfoWithIcon itemInfo){}; } Loading
src/com/android/launcher3/BubbleTextView.java +10 −4 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import com.android.launcher3.model.data.SearchActionItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.util.SafeCloseable; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.BubbleTextHolder; import com.android.launcher3.views.IconLabelDotView; import java.text.NumberFormat; Loading Loading @@ -163,6 +162,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, private HandlerRunnable mIconLoadRequest; private boolean mEnableIconUpdateAnimation = false; private ItemInfoUpdateReceiver mItemInfoUpdateReceiver; public BubbleTextView(Context context) { this(context, null, 0); Loading Loading @@ -240,6 +240,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, mDotParams.scale = 0f; mForceHideDot = false; setBackground(null); mItemInfoUpdateReceiver = null; } private void cancelDotScaleAnim() { Loading Loading @@ -337,13 +338,18 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, setDownloadStateContentDescription(info, info.getProgressLevel()); } private void setItemInfo(ItemInfo itemInfo) { private void setItemInfo(ItemInfoWithIcon itemInfo) { setTag(itemInfo); if (getParent() instanceof BubbleTextHolder) { ((BubbleTextHolder) getParent()).onItemInfoChanged(itemInfo); if (mItemInfoUpdateReceiver != null) { mItemInfoUpdateReceiver.reapplyItemInfo(itemInfo); } } public void setItemInfoUpdateReceiver( ItemInfoUpdateReceiver itemInfoUpdateReceiver) { mItemInfoUpdateReceiver = itemInfoUpdateReceiver; } @UiThread protected void applyIconAndLabel(ItemInfoWithIcon info) { boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER Loading
src/com/android/launcher3/views/BubbleTextHolder.java +5 −3 Original line number Diff line number Diff line Loading @@ -16,12 +16,14 @@ package com.android.launcher3.views; import com.android.launcher3.BubbleTextView; import com.android.launcher3.icons.IconCache; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.ItemInfoWithIcon; /** * Views that contain {@link BubbleTextView} should implement this interface. */ public interface BubbleTextHolder { public interface BubbleTextHolder extends IconCache.ItemInfoUpdateReceiver { BubbleTextView getBubbleText(); /** Loading @@ -29,6 +31,6 @@ public interface BubbleTextHolder { * * @param itemInfo the new itemInfo */ default void onItemInfoChanged(ItemInfo itemInfo) { } @Override default void reapplyItemInfo(ItemInfoWithIcon itemInfo){}; }