Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 1 | page.title=Creating Custom Views |
Joe Fernandez | 33baa5a | 2013-11-14 11:41:19 -0800 | [diff] [blame] | 2 | page.tags=widgets,ui,layout |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 3 | |
| 4 | trainingnavtop=true |
| 5 | startpage=true |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 6 | |
| 7 | @jd:body |
| 8 | |
| 9 | <div id="tb-wrapper"> |
| 10 | <div id="tb"> |
| 11 | |
| 12 | <h2>Dependencies and prerequisites</h2> |
| 13 | <ul> |
| 14 | <li>Android 2.1 (API level 7) or higher</li> |
| 15 | </ul> |
| 16 | |
| 17 | <h2>You should also read</h2> |
| 18 | <ul> |
Scott Main | 6aad995 | 2013-01-07 18:51:49 -0800 | [diff] [blame] | 19 | <li><a href="{@docRoot}guide/topics/ui/custom-components.html">Custom Components</a> |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 20 | </li> |
Scott Main | 6aad995 | 2013-01-07 18:51:49 -0800 | [diff] [blame] | 21 | <li><a href="{@docRoot}guide/topics/ui/ui-events.html">Input Events</a></li> |
| 22 | <li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 23 | Animation</a></li> |
Scott Main | 6aad995 | 2013-01-07 18:51:49 -0800 | [diff] [blame] | 24 | <li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 25 | Acceleration</a></li> |
| 26 | <li><a href="{@docRoot}guide/topics/ui/accessibility/index.html"> |
| 27 | Accessibility</a> developer guide</li> |
| 28 | </ul> |
| 29 | <h2>Try it out</h2> |
| 30 | <div class="download-box"> |
| 31 | <a href="{@docRoot}shareables/training/CustomView.zip" |
| 32 | class="button">Download the sample</a> |
| 33 | <p class="filename">CustomView.zip</p> |
| 34 | </div> |
| 35 | </div> |
| 36 | </div> |
| 37 | |
| 38 | <p> |
| 39 | The Android framework has a large set of {@link android.view.View} classes for |
| 40 | interacting with the user and displaying various |
| 41 | types of data. But |
| 42 | sometimes your app has unique needs that aren’t covered by the built-in views. This class shows you |
| 43 | how to create your |
| 44 | own views that are robust and reusable.</p> |
| 45 | |
| 46 | <h2>Lessons</h2> |
| 47 | |
| 48 | <dl> |
| 49 | <dt><b><a href="create-view.html">Creating a View Class</a></b></dt> |
| 50 | <dd>Create a class that acts like a built-in view, with custom |
| 51 | attributes and support from the <a href="http://developer.android.com/sdk/eclipse-adt.html">ADT</a> layout editor. |
| 52 | </dd> |
| 53 | |
| 54 | <dt><b><a href="custom-drawing.html">Custom Drawing</a></b></dt> |
| 55 | <dd>Make your view visually distinctive using the Android graphics system.</dd> |
| 56 | |
| 57 | <dt><b><a href="making-interactive.html">Making the View Interactive</a></b></dt> |
| 58 | <dd>Users expect a view to react smoothly and naturally to input gestures. |
| 59 | This lesson discusses how to use gesture detection, physics, and animation |
| 60 | to give your user interface a professional feel. |
| 61 | </dd> |
| 62 | |
| 63 | <dt><b><a href="optimizing-view.html">Optimizing the View</a></b></dt> |
| 64 | <dd>No matter how beautiful your UI is, users won't love it if it |
| 65 | doesn't run at a consistently high frame rate. Learn how to avoid common |
| 66 | performance problems, and how to use hardware acceleration to make your |
| 67 | custom drawings run faster. |
| 68 | </dd> |
| 69 | |
| 70 | </dl> |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |