Java android.text Layout fields, constructors, methods, implement or subclass

Example usage for Java android.text Layout fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.text Layout.

The text is from its open source code.

Field

intBREAK_STRATEGY_SIMPLE
Value for break strategy indicating simple line breaking.
intBREAK_STRATEGY_HIGH_QUALITY
Value for break strategy indicating high quality line breaking, including automatic hyphenation and doing whole-paragraph optimization of line breaks.
intBREAK_STRATEGY_BALANCED
Value for break strategy indicating balanced line breaking.
intDIR_RIGHT_TO_LEFT

Method

voiddraw(Canvas c)
Draw this Layout on the specified Canvas.
floatgetDesiredWidth(CharSequence source, int start, int end, TextPaint paint)
Return how wide a layout must be in order to display the specified text slice with one line per paragraph.
floatgetDesiredWidth(CharSequence source, TextPaint paint)
Return how wide a layout must be in order to display the specified text with one line per paragraph.
intgetEllipsisCount(int line)
Returns the number of characters to be ellipsized away, or 0 if no ellipsis is to take place.
intgetHeight()
Return the total height of this layout.
intgetLineAscent(int line)
Get the ascent of the text on the specified line.
intgetLineBaseline(int line)
Return the vertical position of the baseline of the specified line.
intgetLineBottom(int line)
Return the vertical position of the bottom of the specified line.
intgetLineBounds(int line, Rect bounds)
Return the baseline for the specified line (0…getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it.
intgetLineCount()
Return the number of lines of text in this layout.
intgetLineDescent(int line)
Return the descent of the specified line(0…getLineCount() - 1).
intgetLineEnd(int line)
Return the text offset after the last character on the specified line.
intgetLineForOffset(int offset)
Get the line number on which the specified text offset appears.
intgetLineForVertical(int vertical)
Get the line number corresponding to the specified vertical position.
floatgetLineLeft(int line)
Get the leftmost position that should be exposed for horizontal scrolling on the specified line.
floatgetLineMax(int line)
Gets the unsigned horizontal extent of the specified line, including leading margin indent, but excluding trailing whitespace.
intgetLineStart(int line)
Return the text offset of the beginning of the specified line ( 0…getLineCount()).
intgetLineTop(int line)
Return the vertical position of the top of the specified line (0…getLineCount()).
intgetLineVisibleEnd(int line)
Return the text offset after the last visible character (so whitespace is not counted) on the specified line.
floatgetLineWidth(int line)
Gets the unsigned horizontal extent of the specified line, including leading margin indent and trailing whitespace.
intgetOffsetForHorizontal(int line, float horiz)
Get the character offset on the specified line whose position is closest to the specified horizontal position.
TextPaintgetPaint()
Return the base Paint properties for this layout.
intgetParagraphDirection(int line)
Returns the primary directionality of the paragraph containing the specified line, either 1 for left-to-right lines, or -1 for right-to-left lines (see #DIR_LEFT_TO_RIGHT , #DIR_RIGHT_TO_LEFT ).
floatgetPrimaryHorizontal(int offset)
Get the primary horizontal position for the specified text offset.
voidgetSelectionPath(int start, int end, Path dest)
Fills in the specified Path with a representation of a highlight between the specified offsets.
CharSequencegetText()
Return the text that is displayed by this Layout.
intgetWidth()
Return the width of this layout.