summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/WidgetPreviewLoader.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-03 13:05:01 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-08-03 16:39:49 -0700
commit233ee964a9ecf419a3e8330a67456d422879132d (patch)
tree5ce6c56ee6fa4060fffbbb294b505080008da0f7 /src/com/android/launcher3/WidgetPreviewLoader.java
parent6eeab68fd4a5ba51e32717b18c40e9bea8b38e97 (diff)
downloadandroid_packages_apps_Trebuchet-233ee964a9ecf419a3e8330a67456d422879132d.tar.gz
android_packages_apps_Trebuchet-233ee964a9ecf419a3e8330a67456d422879132d.tar.bz2
android_packages_apps_Trebuchet-233ee964a9ecf419a3e8330a67456d422879132d.zip
Calculating widget minSpans and spans statically/independent of orientation
> Filtering the widget list and excluding widgets which dont fit the grid > setting minSpans for the widget item when binding. Bug: 22541314 Bug: 22559137 Change-Id: Ieda48b56c95bee0c7ec71dd691af7e23e2d43db6
Diffstat (limited to 'src/com/android/launcher3/WidgetPreviewLoader.java')
-rw-r--r--src/com/android/launcher3/WidgetPreviewLoader.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index 2a8053d52..1fb795add 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -361,8 +361,8 @@ public class WidgetPreviewLoader {
}
final boolean widgetPreviewExists = (drawable != null);
- final int spanX = info.getSpanX(launcher) < 1 ? 1 : info.getSpanX(launcher);
- final int spanY = info.getSpanY(launcher) < 1 ? 1 : info.getSpanY(launcher);
+ final int spanX = info.spanX;
+ final int spanY = info.spanY;
int previewWidth;
int previewHeight;