Added in API level 1
Summary:
Nested Classes
| Methods
LineBackgroundSpan
public
interface
LineBackgroundSpan
implements
ParagraphStyle
android.text.style.LineBackgroundSpan |
Used to change the background of lines where the span is attached to.
Summary
Nested classes | |
---|---|
class |
LineBackgroundSpan.Standard
Default implementation of the |
Public methods | |
---|---|
abstract
void
|
drawBackground(Canvas canvas, Paint paint, int left, int right, int top, int baseline, int bottom, CharSequence text, int start, int end, int lineNumber)
Draw the background on the canvas. |
Public methods
drawBackground
Added in API level 1
public abstract void drawBackground (Canvas canvas, Paint paint, int left, int right, int top, int baseline, int bottom, CharSequence text, int start, int end, int lineNumber)
Draw the background on the canvas.
Parameters | |
---|---|
canvas |
Canvas : canvas on which the span should be rendered
This value cannot be null . |
paint |
Paint : paint used to draw text, which should be left unchanged on exit
This value cannot be null . |
left |
int : left position of the line relative to input canvas, in pixels
The units of this value are pixels. |
right |
int : right position of the line relative to input canvas, in pixels
The units of this value are pixels. |
top |
int : top position of the line relative to input canvas, in pixels
The units of this value are pixels. |
baseline |
int : baseline of the text relative to input canvas, in pixels
The units of this value are pixels. |
bottom |
int : bottom position of the line relative to input canvas, in pixels
The units of this value are pixels. |
text |
CharSequence : current text
This value cannot be null . |
start |
int : start character index of the line |
end |
int : end character index of the line |
lineNumber |
int : line number in the current text layout |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-05-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-15 UTC."],[],[]]