• Home
  • Raw
  • Download

Lines Matching refs:link

3 parent.link=index.html
7 previous.link=create-view.html
9 next.link=making-interactive.html
44 <p>The most important step in drawing a custom view is to override the {@link
45 android.view.View#onDraw(android.graphics.Canvas) onDraw()} method. The parameter to {@link
46 android.view.View#onDraw(android.graphics.Canvas) onDraw()} is a {@link
47 android.graphics.Canvas Canvas} object that the view can use to draw itself. The {@link
51 {@link
54 <p>Before you can call any drawing methods, though, it's necessary to create a {@link
56 object. The next section discusses {@link android.graphics.Paint Paint} in more detail.</p>
60 <p>The {@link android.graphics} framework divides drawing into two areas:</p>
63 <li><i>What</i> to draw, handled by {@link android.graphics.Canvas Canvas}</li>
64 <li><i>How</i> to draw, handled by {@link android.graphics.Paint}.</li>
67 <p>For instance, {@link android.graphics.Canvas Canvas} provides a method to draw a line, while
68 {@link
69 android.graphics.Paint Paint} provides methods to define that line's color. {@link
71 method to draw a rectangle, while {@link android.graphics.Paint Paint} defines whether to fill that
73 color or leave it empty. Simply put, {@link android.graphics.Canvas Canvas} defines shapes that you
75 screen, while {@link android.graphics.Paint Paint} defines the color, style, font, and so forth of
79 <p>So, before you draw anything, you need to create one or more {@link android.graphics.Paint Paint}
108 objects require expensive initialization. Creating drawing objects within your {@link
124 <p>Although {@link android.view.View} has many methods for handling measurement, most of them do not
127 method: {@link
130 <p>{@link
134 {@link
136 In the {@code PieChart} example, {@link
163 <p>If you need finer control over your view's layout parameters, implement {@link
165 {@link android.view.View.MeasureSpec} values that tell you how big your view's
169 {@link android.view.View.MeasureSpec} to
173 <p>Here's an example implementation of {@link android.view.View#onMeasure onMeasure()}.
201 <li>The helper method {@link android.view.View#resolveSizeAndState resolveSizeAndState()} is
204 {@link android.view.View.MeasureSpec} value
206 {@link android.view.View#onMeasure onMeasure()}.
208 <li>{@link android.view.View#onMeasure onMeasure()} has no return value.
210 calling {@link
213 this call, the {@link android.view.View} class throws a runtime exception.
219 <p>Once you have your object creation and measuring code defined, you can implement {@link
221 implements {@link
227 <li>Draw text using {@link android.graphics.Canvas#drawText drawText()}. Specify the typeface by
228 calling {@link
229 android.graphics.Paint#setTypeface setTypeface()}, and the text color by calling {@link
232 <li>Draw primitive shapes using {@link android.graphics.Canvas#drawRect drawRect()}, {@link
233 android.graphics.Canvas#drawOval drawOval()}, and {@link android.graphics.Canvas#drawArc
235 whether the shapes are filled, outlined, or both by calling {@link
238 <li>Draw more complex shapes using the {@link android.graphics.Path} class.
240 {@link
241 android.graphics.Path} object, then draw the shape using {@link
244 {@link android.graphics.Paint#setStyle
248 Define gradient fills by creating {@link android.graphics.LinearGradient} objects. Call {@link
250 {@link android.graphics.LinearGradient} on filled
252 <li>Draw bitmaps using {@link android.graphics.Canvas#drawBitmap drawBitmap()}.</li>