Fixing drop target padding for the trash bin and all apps.

Change-Id: I65e0af4b52ce26037c77b8120d51226be27efb90
This commit is contained in:
Winson Chung committed 2010-12-20 14:44:38 -08:00
1 parent 047379aa61
commit be5212be73
4 files changed
+30 -17

No files matched your search

@@ -26,6 +26,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
@@ -51,6 +52,12 @@ public class ApplicationInfoDropTarget extends IconDropTarget {
// Set the hover paint colour
int colour = getContext().getResources().getColor(R.color.app_info_filter);
mHoverPaint.setColorFilter(new PorterDuffColorFilter(colour, PorterDuff.Mode.SRC_ATOP));
// For the application info drop target, we just ignore the left padding since we don't want
// to overlap with the delete zone padding
int tb = getResources().getDimensionPixelSize(R.dimen.delete_zone_vertical_drag_padding);
int lr = getResources().getDimensionPixelSize(R.dimen.delete_zone_horizontal_drag_padding);
setDragPadding(tb, lr, tb, 0);
}
public boolean acceptDrop(DragSource source, int x, int y, int xOffset, int yOffset,