Home | History | Annotate | Download | only in improving-layouts

Lines Matching full:layout

2 parent.title=Improving Layout Performance
6 previous.title=Optimizing Layout Hierarchies
7 previous.link=optimizing-layout.html
20 <li><a href="#Create">Create a Re-usable Layout</a></li>
29 href="{@docRoot}guide/topics/resources/layout-resource.html#include-element">Layout
39 you might also need to re-use larger components that require a special layout. To efficiently
41 to embed another layout inside the current layout.</p>
46 extracted, managed separately, then included in each layout. So while
48 do it even more easily by re-using a layout file.</p>
51 <h2 id="Create">Create a Re-usable Layout</h2>
53 <p>If you already know the layout that you want to re-use, create a new XML file and define the
54 layout. For example, here's a layout from the G-Kenya codelab that defines a title bar to be
70 layout to which you add this layout.</p>
75 <p>Inside the layout to which you want to add the re-usable component, add the {@code
76 <include/>} tag. For example, here's a layout from the
79 <p>Here's the layout file:</p>
89 <strong>&lt;include layout="&#64;layout/titlebar"/&gt;</strong>
101 <p>You can also override all the layout parameters (any {@code android:layout_*} attributes) of the
102 included layout's root view by specifying them in the {@code <include/>} tag. For
109 layout="@layout/title"/&gt;
112 <p>However, if you want to override layout attributes using
115 other layout attributes to take effect.</p>
121 when including one layout within another. For example, if your main layout is a vertical {@link
123 re-used in multiple layouts, then the re-usable layout in which you place the two views requires its
125 re-usable layout would result in a vertical {@link android.widget.LinearLayout} inside a
130 {@code <merge>} element as the root view for the re-usable layout. For example:</p>
148 <p>Now, when you include this layout in another layout (using the {@code <include/>} tag), the
150 layout, in place of the {@code <include/>} tag.</p>