Skip to content
This repository has been archived by the owner on Apr 27, 2019. It is now read-only.

5.2.1 · LayoutParams

Mathew Kurian edited this page Nov 26, 2014 · 1 revision

##DocumentLayout.LayoutParams ###Class Overview Calculates the position of each line/word/paragraph. Call measure to calculate the positions. Call draw to render the text.

####Constructors

Description
DocumentLayout(Paint paint)
Constructs a DocumentLayout with the specified the Paint which will be used to draw

####Public Methods

Return Description
void setTextAlignment(TextAlignment textAlignment)
Set the default text alignment/
void setHyphenator(Hyphenator hyphenator)
Set the hypenator that will be used to hyphenate the text.
void setPaddingLeft(float left)
Set the left padding.
void setPaddingTop(float left)
Set the top padding.
void setPaddingBottom(float left)
Set the bottom padding.
void setPaddingRight(float left)
Set the right padding.
void setParentWidth(float parentWidth)
Set the the width of the parent container.
void setOffsetX(float offsetX)
Set the overall offset on the x-axis of the text rendering.
void setOffsetY(float offsetY)
Set the overall offset on the y-axis of the text rendering.
void setLineHeightMultiplier(float lineHeightMultiplier)
Set the line height multiplier.
void setHyphenated(boolean hyphenate)
Enables/disables hyphenation.
void setMaxLines(int maxLines)
Set the maximum number of lines that will be displayed.
void setHyphen(String hyphen)
Set the hypen that will be used (defaule value = -).
void setReverse(boolean reverse)
Enables/disables reverse text. Useful for RTL languages.
TextAlignment getTextAlignment(TextAlignment textAlignment)
Get the active text alignment.
Hyphenator getHyphenator(Hyphenator hyphenator)
Get the active hyphenator.
float getPaddingLeft()
Get the active padding on the left.
float getPaddingTop()
Get the active padding on the top.
float getPaddingBottom()
Get the active padding on the bottom.
float getPaddingRight()
Get the active padding on the right.
float getParentWidth()
Get the active parnet width.
float getOffsetX()
Get the active offset on the x-axis.
float getOffsetY()
Get the active offset on the y-axis.
float getLineHeightMultiplier()
Get the active line multiplier.
float isHyphenated()
Get if the hyphenator is set.
in getMaxLines()
Get the maximum number of lines that will be displayed.
String getHyphen()
Get the active hyphen symbol.
boolean isReverse()
Get if the reverse flag is set.
Clone this wiki locally