Stay organized with collections
Save and categorize content based on your preferences.
LeadingMarginSpan2
interface LeadingMarginSpan2 : LeadingMarginSpan, WrapTogetherSpan
An extended version of LeadingMarginSpan
, which allows the implementor to specify the number of lines of the paragraph to which this object is attached that the "first line of paragraph" margin width will be applied to.
There should only be one LeadingMarginSpan2 per paragraph. The leading margin line count affects all LeadingMarginSpans in the paragraph, adjusting the number of lines to which the first line margin is applied.
As with LeadingMarginSpans, LeadingMarginSpan2s should be attached from the beginning to the end of a paragraph.
Summary
Public methods |
abstract Int |
Returns the number of lines of the paragraph to which this object is attached that the "first line" margin will apply to.
|
Inherited functions |
From class LeadingMarginSpan
Unit |
drawLeadingMargin(c: Canvas!, p: Paint!, x: Int, dir: Int, top: Int, baseline: Int, bottom: Int, text: CharSequence!, start: Int, end: Int, first: Boolean, layout: Layout!)
Renders the leading margin. This is called before the margin has been adjusted by the value returned by getLeadingMargin(boolean) .
|
Int |
getLeadingMargin(first: Boolean)
Returns the amount by which to adjust the leading margin. Positive values move away from the leading edge of the paragraph, negative values move towards it.
|
|
Public methods
getLeadingMarginLineCount
abstract fun getLeadingMarginLineCount(): Int
Returns the number of lines of the paragraph to which this object is attached that the "first line" margin will apply to.
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-04-04 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-04-04 UTC."],[],[]]