Merge "Set width & height of app icons in all widgets tray to 48dp" into sc-dev am: 484b34bf28

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

Change-Id: Ie761836a8aeb46922acaf1630cf56df6ef61dd12
This commit is contained in:
Steven Ng authored and Automerger Merge Worker committed 2021-04-12 22:18:23 +00:00
commit 3fb1f5db41
2 files changed
+8 -1

No files matched your search

+3 -1
View File
@@ -15,6 +15,7 @@
-->
<com.android.launcher3.widget.picker.WidgetsListHeader xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/widgets_list_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -22,7 +23,8 @@
android:background="@drawable/widgets_list_middle_ripple"
android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"
android:paddingVertical="@dimen/widget_list_header_view_vertical_padding"
android:orientation="horizontal">
android:orientation="horizontal"
launcher:appIconSize="48dp">
<ImageView
android:id="@+id/app_icon"
@@ -156,6 +156,11 @@ public final class WidgetsListHeader extends LinearLayout implements ItemInfoUpd
private void applyDrawables(Drawable icon) {
icon.setBounds(0, 0, mIconSize, mIconSize);
LinearLayout.LayoutParams layoutParams =
(LinearLayout.LayoutParams) mAppIcon.getLayoutParams();
layoutParams.width = mIconSize;
layoutParams.height = mIconSize;
mAppIcon.setLayoutParams(layoutParams);
mAppIcon.setImageDrawable(icon);
// If the current icon is a placeholder color, animate its update.