Merge "Fixing small folder bugs"

This commit is contained in:
Adam Cohen authored and Android (Google) Code Review committed 2011-06-30 17:28:09 -07:00
commit 04dc2bc613
2 files changed
+13 -3

No files matched your search

+6
View File
@@ -743,6 +743,12 @@ public class Folder extends LinearLayout implements DragSource, OnItemLongClickL
int left = Math.min(Math.max(0, centeredLeft), parentWidth - width);
int top = Math.min(Math.max(0, centeredTop), parentHeight - height);
if (width >= parentWidth) {
left = (parentWidth - width) / 2;
}
if (height >= parentHeight) {
top = (parentHeight - height) / 2;
}
int folderPivotX = width / 2 + (centeredLeft - left);
int folderPivotY = height / 2 + (centeredTop - top);