aboutsummaryrefslogtreecommitdiffstats
path: root/org_apg/src/org/apg/ui/widget/DashboardLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'org_apg/src/org/apg/ui/widget/DashboardLayout.java')
-rw-r--r--org_apg/src/org/apg/ui/widget/DashboardLayout.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/org_apg/src/org/apg/ui/widget/DashboardLayout.java b/org_apg/src/org/apg/ui/widget/DashboardLayout.java
index c578f26cd..8cd97ca05 100644
--- a/org_apg/src/org/apg/ui/widget/DashboardLayout.java
+++ b/org_apg/src/org/apg/ui/widget/DashboardLayout.java
@@ -27,7 +27,6 @@ import android.view.ViewGroup;
*/
public class DashboardLayout extends ViewGroup {
private static final int UNEVEN_GRID_PENALTY_MULTIPLIER = 10;
- private static final int OVERLAP_PENALTY_MULTIPLIER = 10;
private int mMaxChildWidth = 0;
private int mMaxChildHeight = 0;
@@ -129,12 +128,8 @@ public class DashboardLayout extends ViewGroup {
spaceDifference = Math.abs(vSpace - hSpace);
if (rows * cols != visibleCount) {
spaceDifference *= UNEVEN_GRID_PENALTY_MULTIPLIER;
- }
- if (hSpace < 0) {
- spaceDifference *= OVERLAP_PENALTY_MULTIPLIER;
- }
- if (vSpace < 0) {
- spaceDifference *= OVERLAP_PENALTY_MULTIPLIER;
+ } else if (rows * mMaxChildHeight > height || cols * mMaxChildWidth > width) {
+ spaceDifference *= UNEVEN_GRID_PENALTY_MULTIPLIER;
}
if (spaceDifference < bestSpaceDifference) {