TextSelection

TextSelection represents a selection of text on a document page. This class is not meant to be generated manually, but should be retrieved by calling getTextSelection or by registering a OnTextSelectionModeChangeListener.

See also

Properties

Link copied to clipboard
Link copied to clipboard
@IntRange(from = 0)
val pageIndex: Int
The number of the document page, where the text is selected.
Link copied to clipboard
The selected text or null if there is no text in the current selection.
Link copied to clipboard
A list of rects, holding the selection (in PDF points).
Link copied to clipboard
The selected text range.

Functions

Link copied to clipboard
open fun describeContents(): Int
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun fromTextRange(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull textRange: Range): TextSelection
Factory method.
Link copied to clipboard
open fun fromTextRects(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull touchedTextRects: TextSelectionRectangles): TextSelection
Factory method.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun writeToParcel(@NonNull dest: Parcel, flags: Int)