summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/WidgetListAdapter.java
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2010-07-12 14:25:18 -0700
committerPatrick Dubroy <dubroy@google.com>2010-07-12 17:29:35 -0700
commit6569f2c80e179c2f8ed73dae6b01d971ec20f005 (patch)
tree7663e08de41929b01128176660fd1e5271ea5bb7 /src/com/android/launcher2/WidgetListAdapter.java
parent4ab2f860e704b48a721b30095ebbdd353e3c00c4 (diff)
downloadandroid_packages_apps_Trebuchet-6569f2c80e179c2f8ed73dae6b01d971ec20f005.tar.gz
android_packages_apps_Trebuchet-6569f2c80e179c2f8ed73dae6b01d971ec20f005.tar.bz2
android_packages_apps_Trebuchet-6569f2c80e179c2f8ed73dae6b01d971ec20f005.zip
When dragging items on the home screen, visualize where they will drop.
Draw a rectangle around the area where an item will land if it is dropped. If the area is vacant, the rectangle is green; otherwise, it is red. Change-Id: I859b52514566fa55f8c7a04493b8088d12baa476
Diffstat (limited to 'src/com/android/launcher2/WidgetListAdapter.java')
-rw-r--r--src/com/android/launcher2/WidgetListAdapter.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher2/WidgetListAdapter.java b/src/com/android/launcher2/WidgetListAdapter.java
index 5a569ea02..5d5d86a67 100644
--- a/src/com/android/launcher2/WidgetListAdapter.java
+++ b/src/com/android/launcher2/WidgetListAdapter.java
@@ -85,6 +85,8 @@ public class WidgetListAdapter extends BaseAdapter {
image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
textView.setCompoundDrawables(null, image, null, null);
textView.setText(info.label);
+ // Store the widget info on the associated view so we can easily fetch it later
+ textView.setTag(info);
return textView;
}