Skip to content

Commit 9f061e2

Browse files
committed
fix information about layout overrides
bug: 6852515 Change-Id: I80681a06e87aad3de8243bb731d7513e5aa29d08
1 parent fc815c3 commit 9f061e2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/html/guide/topics/resources/layout-resource.jd

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ included layout. Only effective if <code>android:layout_height</code> is also de
161161
supported by the root element in the included layout and they will override those defined in the
162162
root element.</p>
163163

164-
<p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
165-
you must override both <code>android:layout_height</code> and
166-
<code>android:layout_width</code>&mdash;you cannot override only the height or only the width.
167-
If you override only one, it will not take effect. (Other layout properties, such as weight,
168-
are still inherited from the source layout.)</p>
164+
<p class="caution"><strong>Caution:</strong> If you want to override layout attributes using
165+
the <code>&lt;include&gt;</code> tag, you must override both
166+
<code>android:layout_height</code> and <code>android:layout_width</code> in order for
167+
other layout attributes to take effect.</p>
169168

170169
<p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight
171170
View that consumes no layout space until you explicitly inflate it, at which point, it includes a

0 commit comments

Comments
 (0)