diff options
author | Scott Main <smain@google.com> | 2010-11-24 12:39:42 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-24 12:39:42 -0800 |
commit | 93116f8fb171a3cf0e9b68b70e2b275a8b6a32f7 (patch) | |
tree | 5ff683b7a3f69f09e4ffbd4ffd1d3d8b26ecd561 /docs/html/guide/topics | |
parent | 5df8c155872833647ac56951ab90bd26a9af9480 (diff) | |
parent | 3577f51d4bc236a11e283855337752a7b6897f8b (diff) | |
download | frameworks_base-93116f8fb171a3cf0e9b68b70e2b275a8b6a32f7.zip frameworks_base-93116f8fb171a3cf0e9b68b70e2b275a8b6a32f7.tar.gz frameworks_base-93116f8fb171a3cf0e9b68b70e2b275a8b6a32f7.tar.bz2 |
am 3577f51d: docs: clarify <include> layout properties bug: 3227820
* commit '3577f51d4bc236a11e283855337752a7b6897f8b':
docs: clarify <include> layout properties bug: 3227820
Diffstat (limited to 'docs/html/guide/topics')
-rw-r--r-- | docs/html/guide/topics/resources/layout-resource.jd | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd index 111851c..36369d3 100644 --- a/docs/html/guide/topics/resources/layout-resource.jd +++ b/docs/html/guide/topics/resources/layout-resource.jd @@ -149,17 +149,23 @@ resource.</dd> </dd> <dt><code>android:layout_height</code></dt> <dd><em>Dimension or keyword</em>. Overrides the height given to the root view in the -included layout. +included layout. Only effective if <code>android:layout_width</code> is also declared. </dd> <dt><code>android:layout_width</code></dt> <dd><em>Dimension or keyword</em>. Overrides the width given to the root view in the -included layout. +included layout. Only effective if <code>android:layout_height</code> is also declared. </dd> </dl> <p>You can include any other layout attributes in the <code><include></code> that are supported by the root element in the included layout and they will override those defined in the root element.</p> + <p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions, +you must override both <code>android:layout_height</code> and +<code>android:layout_width</code>—you cannot override only the height or only the width. +If you override only one, it will not take effect. (Other layout properties, such as weight, +are still inherited from the source layout.)</p> + <p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight View that consumes no layout space until you explicitly inflate it, at which point, it includes a layout file defined by its {@code android:layout} attribute. For more information about using {@link |