Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW
- Create another icon, "all_apps_predicted_row_icon" that will be the mDisplay for the predicted app row
in AllAppsList
Bug:299171695
Test: video
Before: https://drive.google.com/file/d/1HxNW0015nQHCc7eQiySf-gwsHrLs_JjR/view?usp=sharing
after: https://drive.google.com/file/d/1HyEwKI-yumILTCjglKcqovhTlRVjNGxg/view?usp=sharing - making sure that QL is fine and dragging regular Toast results are normal
Flag: N/a
Change-Id: Ie002cacb168396dbea39f79679bd6a04b80e374b
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index abf84dd..a539148 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -99,8 +99,9 @@
private static final int DISPLAY_FOLDER = 2;
protected static final int DISPLAY_TASKBAR = 5;
public static final int DISPLAY_SEARCH_RESULT = 6;
- private static final int DISPLAY_SEARCH_RESULT_SMALL = 7;
+ public static final int DISPLAY_SEARCH_RESULT_SMALL = 7;
public static final int DISPLAY_PREDICTION_ROW = 8;
+ public static final int DISPLAY_SEARCH_RESULT_APP_ROW = 9;
private static final float MIN_LETTER_SPACING = -0.05f;
private static final int MAX_SEARCH_LOOP_COUNT = 20;
@@ -214,7 +215,8 @@
setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
defaultIconSize = grid.iconSizePx;
setCenterVertically(grid.iconCenterVertically);
- } else if (mDisplay == DISPLAY_ALL_APPS || mDisplay == DISPLAY_PREDICTION_ROW) {
+ } else if (mDisplay == DISPLAY_ALL_APPS || mDisplay == DISPLAY_PREDICTION_ROW
+ || mDisplay == DISPLAY_SEARCH_RESULT_APP_ROW) {
setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx);
setCompoundDrawablePadding(grid.allAppsIconDrawablePaddingPx);
defaultIconSize = grid.allAppsIconSizePx;
@@ -1104,8 +1106,13 @@
}
public boolean isDisplaySearchResult() {
- return mDisplay == DISPLAY_SEARCH_RESULT ||
- mDisplay == DISPLAY_SEARCH_RESULT_SMALL;
+ return mDisplay == DISPLAY_SEARCH_RESULT
+ || mDisplay == DISPLAY_SEARCH_RESULT_SMALL
+ || mDisplay == DISPLAY_SEARCH_RESULT_APP_ROW;
+ }
+
+ public int getIconDisplay() {
+ return mDisplay;
}
@Override