summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-06-01 17:03:13 -0700
committerMichael Jurka <mikejurka@google.com>2011-06-01 17:09:50 -0700
commit32271c3d20939d4fa02d4c84e1d95cefd5c183fd (patch)
tree4ca30af9560f437d0d56d1b54ef11bc05d08adc6 /src/com
parent330ae9835c920d4bdba43806d733c350991d0dcf (diff)
downloadandroid_packages_apps_Trebuchet-32271c3d20939d4fa02d4c84e1d95cefd5c183fd.tar.gz
android_packages_apps_Trebuchet-32271c3d20939d4fa02d4c84e1d95cefd5c183fd.tar.bz2
android_packages_apps_Trebuchet-32271c3d20939d4fa02d4c84e1d95cefd5c183fd.zip
Tweak calculation for number of columns and rows
Change-Id: I267e369167597b01768a7a9344b2f468d5a046e4
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher2/CellLayout.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 0d026b8aa..4a82799de 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -273,27 +273,20 @@ public class CellLayout extends ViewGroup {
// We use this method from Workspace to figure out how many rows/columns Launcher should
// have. We ignore the left/right padding on CellLayout because it turns out in our design
// the padding extends outside the visible screen size, but it looked fine anyway.
- // However, we make sure there's at least enough space for the crosshairs at either
- // edge to be rendered (half the crosshair is sticking out on either side)
int cellWidth = r.getDimensionPixelSize(R.dimen.workspace_cell_width);
int widthGap = r.getDimensionPixelSize(R.dimen.workspace_width_gap_port);
- int crosshairsSize = r.getDrawable(R.drawable.gardening_crosshairs).getIntrinsicWidth();
- return widthGap * (numCells - 1) + cellWidth * numCells + crosshairsSize;
+ return widthGap * (numCells - 1) + cellWidth * numCells;
}
static int heightInLandscape(Resources r, int numCells) {
// We use this method from Workspace to figure out how many rows/columns Launcher should
// have. We ignore the left/right padding on CellLayout because it turns out in our design
// the padding extends outside the visible screen size, but it looked fine anyway.
- // However, we make sure there's at least enough space for the crosshairs at the bottom
- // to be rendered (half the crosshair is sticking out); we don't worry about the top
- // crosshair since it can bleed into the action bar space
int cellHeight = r.getDimensionPixelSize(R.dimen.workspace_cell_height);
int heightGap = r.getDimensionPixelSize(R.dimen.workspace_height_gap_land);
- int crosshairsSize = r.getDrawable(R.drawable.gardening_crosshairs).getIntrinsicHeight();
- return heightGap * (numCells - 1) + cellHeight * numCells + (crosshairsSize + 1) / 2;
+ return heightGap * (numCells - 1) + cellHeight * numCells;
}
private void invalidateBubbleTextView(BubbleTextView icon) {