Added in API level 1
LineBackgroundSpan
interface LineBackgroundSpan : ParagraphStyle
android.text.style.LineBackgroundSpan |
Used to change the background of lines where the span is attached to.
Summary
Nested classes | |
---|---|
open |
Default implementation of the |
Public methods | |
---|---|
abstract Unit |
drawBackground(canvas: Canvas, paint: Paint, left: Int, right: Int, top: Int, baseline: Int, bottom: Int, text: CharSequence, start: Int, end: Int, lineNumber: Int) Draw the background on the canvas. |
Public methods
drawBackground
Added in API level 1
abstract fun drawBackground(
canvas: Canvas,
paint: Paint,
left: Int,
right: Int,
top: Int,
baseline: Int,
bottom: Int,
text: CharSequence,
start: Int,
end: Int,
lineNumber: Int
): Unit
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 |