OSDN Git Service

Configure TabHosts on drop
authorTor Norbye <tnorbye@google.com>
Tue, 18 Jan 2011 06:04:10 +0000 (22:04 -0800)
committerTor Norbye <tnorbye@google.com>
Tue, 18 Jan 2011 06:05:38 +0000 (22:05 -0800)
Add a dummy child to the TabHost on drop.

Change-Id: I0f00dda449b81025c24933b6e1578b6b1a431272

eclipse/dictionary.txt
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/TabHostRule.java

index 29219a7..cc6db64 100644 (file)
@@ -77,6 +77,7 @@ fallback
 foo
 foreach
 fqcn
+framelayout
 gen
 groovy
 guava
@@ -175,6 +176,7 @@ snip
 spec
 standalone
 stash
+stateful
 stateless
 stderr
 stdout
index 9f8ea80..1029112 100755 (executable)
@@ -66,6 +66,11 @@ public class TabHostRule extends IgnoredLayoutRule {
             frame.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, fillParent);
             frame.setAttribute(ANDROID_URI, ATTR_LAYOUT_HEIGHT, fillParent);
             frame.setAttribute(ANDROID_URI, ATTR_ID, "@android:id/tabcontent"); //$NON-NLS-1$
+
+            INode child = frame.appendChild(FQCN_LINEAR_LAYOUT);
+            child.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, fillParent);
+            child.setAttribute(ANDROID_URI, ATTR_LAYOUT_HEIGHT, fillParent);
+            child.setAttribute(ANDROID_URI, ATTR_ID, "@+id/contentlayout"); //$NON-NLS-1$
         }
     }