• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
30
31<p>Layouts are a key part of Android applications that directly affect the user experience. If
32implemented poorly, your layout can lead to a memory hungry application with slow UIs. The Android
33SDK includes tools to help you identify problems in your layout performance, which when combined the
34lessons here, you will be able to implement smooth scrolling interfaces with a minimum memory
35footprint.</p>
36
37
38
39<h2>Lessons</h2>
40
41<dl>
42  <dt><b><a href="optimizing-layout.html">Optimizing Layout Hierarchies</a></b></dt>
43    <dd>In the same way a complex web page can slow down load time, your layout hierarchy
44if too complex can also cause performance problems. This lesson shows how you can use SDK tools
45to inspect your layout and discover performance bottlenecks.</dd>
46  <dt><b><a href="reusing-layouts.html">Re-using Layouts with &lt;include/&gt;</a></b></dt>
47    <dd>If your application UI repeats certain layout constructs in multiple places, this lesson
48shows you how to create efficient, re-usable layout constructs, then include them in the appropriate
49UI layouts.</dd>
50  <dt><b><a href="loading-ondemand.html">Loading Views On Demand</a></b></dt>
51    <dd>Beyond simply including one layout component within another layout, you might want to
52make the included layout visible only when it's needed, sometime after the activity is running.
53This lesson shows how you can improve your layout's initialization performance by loading
54portions of your layout on demand.</dd>
55  <dt><b><a href="smooth-scrolling.html">Making ListView Scrolling Smooth</a></b></dt>
56    <dd>If you've built an instance of {@link android.widget.ListView} that contains complex or
57data-heavy content in each list item, the scroll performance of the list might suffer. This
58lesson provides some tips about how you can make your scrolling performance more smooth.</dd>
59</dl>