1page.title=Improving Layout Performance
2page.tags=include,merge,viewstub,listview
3
4trainingnavtop=true
5startpage=true
6next.title=Optimizing Layout
7next.link=optimizing-layout.html
8
9@jd:body
10
11<div id="tb-wrapper">
12<div id="tb">
13
14<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
15<h2>Dependencies and prerequisites</h2>
16<ul>
17 <li>Android 1.5 (API Level 3) or higher</li>
18</ul>
19
20<!-- related docs (NOT javadocs) -->
21<h2>You should also read</h2>
22<ul>
23 <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a></li>
24</ul>
25
26</div>
27</div>
28
29<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=-FUw8HMbmBQ">
30<div>
31    <h3>Video</h3>
32    <p>DevBytes: Optimising Layouts with Hierarchy Viewer</p>
33</div>
34</a>
35
36
37
38<p>Layouts are a key part of Android applications that directly affect the user experience. If
39implemented poorly, your layout can lead to a memory hungry application with slow UIs. The Android
40SDK includes tools to help you identify problems in your layout performance, which when combined the
41lessons here, you will be able to implement smooth scrolling interfaces with a minimum memory
42footprint.</p>
43
44
45
46<h2>Lessons</h2>
47
48<dl>
49  <dt><b><a href="optimizing-layout.html">Optimizing Layout Hierarchies</a></b></dt>
50    <dd>In the same way a complex web page can slow down load time, your layout hierarchy
51if too complex can also cause performance problems. This lesson shows how you can use SDK tools
52to inspect your layout and discover performance bottlenecks.</dd>
53  <dt><b><a href="reusing-layouts.html">Re-using Layouts with &lt;include/&gt;</a></b></dt>
54    <dd>If your application UI repeats certain layout constructs in multiple places, this lesson
55shows you how to create efficient, re-usable layout constructs, then include them in the appropriate
56UI layouts.</dd>
57  <dt><b><a href="loading-ondemand.html">Loading Views On Demand</a></b></dt>
58    <dd>Beyond simply including one layout component within another layout, you might want to
59make the included layout visible only when it's needed, sometime after the activity is running.
60This lesson shows how you can improve your layout's initialization performance by loading
61portions of your layout on demand.</dd>
62  <dt><b><a href="smooth-scrolling.html">Making ListView Scrolling Smooth</a></b></dt>
63    <dd>If you've built an instance of {@link android.widget.ListView} that contains complex or
64data-heavy content in each list item, the scroll performance of the list might suffer. This
65lesson provides some tips about how you can make your scrolling performance more smooth.</dd>
66</dl>
67