Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 484b34bf authored by Steven Ng's avatar Steven Ng Committed by Android (Google) Code Review
Browse files

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

parents 5427fa7b 36911790
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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"
+5 −0
Original line number Diff line number Diff line
@@ -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.