aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-03-01 13:59:38 -0800
committerTor Norbye <tnorbye@google.com>2012-03-01 13:59:38 -0800
commit4e7e62de10fb747a8928a37b556159da0219216a (patch)
treef38c284c1c8dfeb46e3fa5986a801c8aa942f88f /eclipse
parent5879c13d7bfa88e181062178d492713e3ddbadfb (diff)
downloadsdk-4e7e62de10fb747a8928a37b556159da0219216a.zip
sdk-4e7e62de10fb747a8928a37b556159da0219216a.tar.gz
sdk-4e7e62de10fb747a8928a37b556159da0219216a.tar.bz2
GridLayout fix: Ensure that the column count is adequate
Change-Id: Ic1c82cae57d1ea41f54b49c3414ae526b2045ec7
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/GridDropHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/GridDropHandler.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/GridDropHandler.java
index 796252b..0c7ed9f 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/GridDropHandler.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/GridDropHandler.java
@@ -680,7 +680,8 @@ public class GridDropHandler {
// Ensure that we don't store columnCount=0
if (mGrid.actualColumnCount == 0) {
- mGrid.layout.setAttribute(ANDROID_URI, ATTR_COLUMN_COUNT, VALUE_1);
+ mGrid.layout.setAttribute(ANDROID_URI, ATTR_COLUMN_COUNT,
+ Integer.toString(Math.max(1, column + 1)));
}
return newChild;