blob: 87cd0b0fe8e6d9137b708bc6ea99b229a8c44791 [file] [log] [blame]
Scott Main50e990c2012-06-21 17:14:39 -07001page.title=Creating Custom Views
Joe Fernandez33baa5a2013-11-14 11:41:19 -08002page.tags=widgets,ui,layout
Scott Main50e990c2012-06-21 17:14:39 -07003
4trainingnavtop=true
5startpage=true
Scott Main50e990c2012-06-21 17:14:39 -07006
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 Main6aad9952013-01-07 18:51:49 -080019 <li><a href="{@docRoot}guide/topics/ui/custom-components.html">Custom Components</a>
Scott Main50e990c2012-06-21 17:14:39 -070020 </li>
Scott Main6aad9952013-01-07 18:51:49 -080021 <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 Main50e990c2012-06-21 17:14:39 -070023 Animation</a></li>
Scott Main6aad9952013-01-07 18:51:49 -080024 <li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware
Scott Main50e990c2012-06-21 17:14:39 -070025 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"
32class="button">Download the sample</a>
33<p class="filename">CustomView.zip</p>
34</div>
35 </div>
36</div>
37
38<p>
39The Android framework has a large set of {@link android.view.View} classes for
40interacting with the user and displaying various
41types of data. But
42sometimes your app has unique needs that arent covered by the built-in views. This class shows you
43how to create your
44own 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