LineBreaker.ParagraphConstraints

public static class LineBreaker.ParagraphConstraints
extends Object

java.lang.Object
   ↳ android.graphics.text.LineBreaker.ParagraphConstraints


Line breaking constraints for single paragraph.

Summary

Public constructors

ParagraphConstraints()

Public methods

float getDefaultTabStop()

Returns the default tab stops in pixels.

float getFirstWidth()

Return the first line's width for this paragraph in pixel.

int getFirstWidthLineCount()

Return the number of lines to apply the first line's width.

float[] getTabStops()

Returns the array of tab stops in pixels.

float getWidth()

Return the width for this paragraph in pixels.

void setIndent(float firstWidth, int firstWidthLineCount)

Set indent for this paragraph.

void setTabStops(float[] tabStops, float defaultTabStop)

Set tab stops for this paragraph.

void setWidth(float width)

Set width for this paragraph.

Inherited methods

Public constructors

ParagraphConstraints

Added in API level 29
public ParagraphConstraints ()

Public methods

getDefaultTabStop

Added in API level 29
public float getDefaultTabStop ()

Returns the default tab stops in pixels.
This units of this value are pixels.

Returns
float This units of this value are pixels. {} Value is 0 or greater

getFirstWidth

Added in API level 29
public float getFirstWidth ()

Return the first line's width for this paragraph in pixel.
This units of this value are pixels.

Returns
float This units of this value are pixels. {} Value is 0.0f or greater

getFirstWidthLineCount

Added in API level 29
public int getFirstWidthLineCount ()

Return the number of lines to apply the first line's width.
This units of this value are pixels.

Returns
int This units of this value are pixels. {} Value is 0 or greater

getTabStops

Added in API level 29
public float[] getTabStops ()

Returns the array of tab stops in pixels.

Returns
float[] This value may be null.

getWidth

Added in API level 29
public float getWidth ()

Return the width for this paragraph in pixels.
This units of this value are pixels.

Returns
float This units of this value are pixels. {} Value is 0.0f or greater

See also:

setIndent

Added in API level 29
public void setIndent (float firstWidth, 
                int firstWidthLineCount)

Set indent for this paragraph.

Parameters
firstWidth float: the line width of the starting of the paragraph This units of this value are pixels. Value is 0.0f or greater

firstWidthLineCount int: the number of lines that applies the firstWidth This units of this value are pixels. Value is 0 or greater

setTabStops

Added in API level 29
public void setTabStops (float[] tabStops, 
                float defaultTabStop)

Set tab stops for this paragraph.

Parameters
tabStops float: the array of pixels of tap stopping position This value may be null.

defaultTabStop float: pixels of the default tab stopping position This units of this value are pixels. Value is 0 or greater

setWidth

Added in API level 29
public void setWidth (float width)

Set width for this paragraph.

Parameters
width float: This units of this value are pixels. Value is 0.0f or greater

See also: