Merge "Differentiate between app row and shortcut icons." into tm-qpr-dev am: 1874371aab

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20119299

Change-Id: Ic761d878fadad33fa9fa6be61c324bf3f229b93b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Andy Wickham
2022-10-07 21:06:29 +00:00
committed by Automerger Merge Worker
@@ -20,6 +20,7 @@ import static android.view.View.VISIBLE;
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7;
@@ -38,6 +39,7 @@ import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.model.data.ItemInfo;
/** Coordinates the transition between Search and A-Z in All Apps. */
public class SearchTransitionController {
@@ -187,7 +189,9 @@ public class SearchTransitionController {
top = searchResultView.getTop();
}
if (searchResultView instanceof BubbleTextView) {
if (searchResultView instanceof BubbleTextView
&& searchResultView.getTag() instanceof ItemInfo
&& ((ItemInfo) searchResultView.getTag()).itemType == ITEM_TYPE_APPLICATION) {
// The first app icon will set appRowHeight, which will also contribute to
// totalHeight. Additional app icons should remove the appRowHeight to remain in
// the same row as the first app.
@@ -197,6 +201,8 @@ public class SearchTransitionController {
totalHeight += appRowHeight;
}
// Don't scale/fade app row.
searchResultView.setScaleY(1);
searchResultView.setAlpha(1);
continue;
}