Scott Main | 7736f96 | 2011-12-15 15:40:25 -0800 | [diff] [blame] | 1 | page.title=Improving Layout Performance |
Scott Main | 569ed22 | 2011-12-02 13:49:44 -0800 | [diff] [blame] | 2 | |
| 3 | trainingnavtop=true |
| 4 | startpage=true |
| 5 | next.title=Optimizing Layout |
| 6 | next.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 |
| 31 | implemented poorly, your layout can lead to a memory hungry application with slow UIs. The Android |
| 32 | SDK includes tools to help you identify problems in your layout performance, which when combined the |
| 33 | lessons here, you will be able to implement smooth scrolling interfaces with a minimum memory |
| 34 | footprint.</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 |
| 43 | if too complex can also cause performance problems. This lesson shows how you can use SDK tools |
| 44 | to inspect your layout and discover performance bottlenecks.</dd> |
| 45 | <dt><b><a href="reusing-layouts.html">Re-using Layouts with <include/></a></b></dt> |
| 46 | <dd>If your application UI repeats certain layout constructs in multiple places, this lesson |
| 47 | shows you how to create efficient, re-usable layout constructs, then include them in the appropriate |
| 48 | UI 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 |
| 51 | make the included layout visible only when it's needed, sometime after the activity is running. |
| 52 | This lesson shows how you can improve your layout's initialization performance by loading |
| 53 | portions 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 |
| 56 | data-heavy content in each list item, the scroll performance of the list might suffer. This |
| 57 | lesson provides some tips about how you can make your scrolling performance more smooth.</dd> |
| 58 | </dl> |