When adding or moving a resizable widget, the widget may resize
-> If a widget is resizable, and there is not enough room to add it
in its current (or default) size, but can be scaled down to fit
a certain area, it will be resized to fit the available space
-> The resizing is animated using a crossfade and scale between
the original dragView and the widget rendered in the final size
Change-Id: I75db9dcabecce11598b3ae55f20b96b2ec6b7e87
diff --git a/src/com/android/launcher2/PendingAddItemInfo.java b/src/com/android/launcher2/PendingAddItemInfo.java
index 09a8a9e..d36e217 100644
--- a/src/com/android/launcher2/PendingAddItemInfo.java
+++ b/src/com/android/launcher2/PendingAddItemInfo.java
@@ -34,6 +34,8 @@
class PendingAddWidgetInfo extends PendingAddItemInfo {
int minWidth;
int minHeight;
+ int minResizeWidth;
+ int minResizeHeight;
int previewImage;
int icon;
AppWidgetProviderInfo info;
@@ -50,6 +52,8 @@
componentName = i.provider;
minWidth = i.minWidth;
minHeight = i.minHeight;
+ minResizeWidth = i.minResizeWidth;
+ minResizeHeight = i.minResizeHeight;
previewImage = i.previewImage;
icon = i.icon;
if (dataMimeType != null && data != null) {
@@ -62,6 +66,8 @@
public PendingAddWidgetInfo(PendingAddWidgetInfo copy) {
minWidth = copy.minWidth;
minHeight = copy.minHeight;
+ minResizeWidth = copy.minResizeWidth;
+ minResizeHeight = copy.minResizeHeight;
previewImage = copy.previewImage;
icon = copy.icon;
info = copy.info;