Set width & height of app icons in all widgets tray to 48dp
Bug: 184877669 Test: Change the grid size and observe app icons in all widgets tray stay the same. Change-Id: I856d5fada579474fffb6296d641fb686623ca2cc
This commit is contained in:
parent
ffb976c404
commit
3691179041
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue