Increase hot rectangle of trash can.
The drop region is now 70dip^2. This means it invisibly
overlaps nearby icons ever so slightly---not enough to
prevent icons being properly dropped on the workspace.
Bug: 2623734
Change-Id: I945160ef6bdfc0a4ac3cf9db57d440bad424dfc4
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 96db6df..1f13f1f 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -77,8 +77,9 @@
<com.android.launcher2.DeleteZone
android:id="@+id/delete_zone"
- android:layout_width="@dimen/button_bar_height_portrait"
- android:layout_height="match_parent"
+ android:layout_width="@dimen/delete_zone_size"
+ android:layout_height="@dimen/delete_zone_size"
+ android:paddingLeft="@dimen/delete_zone_padding"
android:layout_marginBottom="@dimen/half_status_bar_height"
android:layout_gravity="right|center_vertical"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index c1a7440..8dc5092 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -71,8 +71,9 @@
<com.android.launcher2.DeleteZone
android:id="@+id/delete_zone"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/button_bar_height"
+ android:layout_width="@dimen/delete_zone_size"
+ android:layout_height="@dimen/delete_zone_size"
+ android:paddingTop="@dimen/delete_zone_padding"
android:layout_gravity="bottom|center_horizontal"
android:scaleType="center"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5e3bb98..26cb7e6 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -27,4 +27,10 @@
<!-- roughly half a status bar (for vertically centering the right-hand
button cluster in landscape) -->
<dimen name="half_status_bar_height">12dip</dimen>
+
+ <!-- height & width of the drop rectangle for the trash icon -->
+ <dimen name="delete_zone_size">70dip</dimen>
+
+ <!-- delete_zone_size_full - button_bar_height_portrait -->
+ <dimen name="delete_zone_padding">14dip</dimen>
</resources>