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