From 9f061e2809ce89e0646519791cb69825abbb03a5 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Mon, 23 Jul 2012 18:32:03 -0700 Subject: [PATCH] fix information about layout overrides bug: 6852515 Change-Id: I80681a06e87aad3de8243bb731d7513e5aa29d08 --- docs/html/guide/topics/resources/layout-resource.jd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd index 5643075c6a3ab..c653b0cc366e0 100644 --- a/docs/html/guide/topics/resources/layout-resource.jd +++ b/docs/html/guide/topics/resources/layout-resource.jd @@ -161,11 +161,10 @@ included layout. Only effective if android:layout_height is also de supported by the root element in the included layout and they will override those defined in the root element.

-

Caution: If you want to override the layout dimensions, -you must override both android:layout_height and -android:layout_width—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.)

+

Caution: If you want to override layout attributes using + the <include> tag, you must override both + android:layout_height and android:layout_width in order for + other layout attributes to take effect.

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