lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey
added in API level 1

LineHeightSpan

public interface LineHeightSpan
implements ParagraphStyle, WrapTogetherSpan

android.text.style.LineHeightSpan


The classes that affect the height of the line should implement this interface.

Summary

Nested classes

interface LineHeightSpan.WithDensity

The classes that affect the height of the line with respect to density, should implement this interface. 

Public methods

abstract void chooseHeight(CharSequence text, int start, int end, int spanstartv, int lineHeight, Paint.FontMetricsInt fm)

Classes that implement this should define how the height is being calculated.

Public methods

chooseHeight

added in API level 1
public abstract void chooseHeight (CharSequence text, 
                int start, 
                int end, 
                int spanstartv, 
                int lineHeight, 
                Paint.FontMetricsInt fm)

Classes that implement this should define how the height is being calculated.

Parameters
text CharSequence: the text

start int: the start of the line

end int: the end of the line

spanstartv int: the start of the span

lineHeight int: the line height

fm Paint.FontMetricsInt: font metrics of the paint, in integers