PageSelection
class PageSelection : Parcelable
| kotlin.Any | |
| ↳ | android.graphics.pdf.models.selection.PageSelection | 
Represents the list of selected content on a particular page of the PDF document. By default, the selection boundary is represented from left to right. Note: Currently supports text selection only.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
            PageSelection(page: Int, start: SelectionBoundary, stop: SelectionBoundary, selectedContents: MutableList<PdfPageTextContent!>)Creates a new instance of   | 
        |
| Public methods | |
|---|---|
| Int | |
| Int | 
            getPage()Gets the particular page for which the selection is highlighted.  | 
        
| MutableList<PdfPageTextContent!> | 
            
             Returns the text content within the selection boundaries on the page.  | 
        
| SelectionBoundary | 
            getStart()Gets the edge from where the selection starts- index is inclusive.  | 
        
| SelectionBoundary | 
            getStop()Gets the edge where the selection stops - index is inclusive.  | 
        
| Unit | 
            writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel.  | 
        
| Properties | |
|---|---|
| static Parcelable.Creator<PageSelection!> | |
Public constructors
PageSelection
PageSelection(
page: Int,
start: SelectionBoundary,
stop: SelectionBoundary,
selectedContents: MutableList<PdfPageTextContent!>)
Creates a new instance of PageSelection for the specified page, the start and stop selection boundary, and the selected text content.
| Parameters | |
|---|---|
page | 
            Int: The page number of the selection. | 
start | 
            SelectionBoundary: Boundary where the selection starts. This value cannot be null. | 
          
stop | 
            SelectionBoundary: Boundary where the selection stops. This value cannot be null. | 
          
selectedContents | 
            MutableList<PdfPageTextContent!>: list of segments of selected text content. This value cannot be null. | 
          
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            If the page number is negative. | 
java.lang.NullPointerException | 
            If start/stop edge or text selection is null. | 
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int | 
            a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
          
getPage
fun getPage(): Int
Gets the particular page for which the selection is highlighted.
| Return | |
|---|---|
Int | 
            The page number on which the current selection resides. | 
getSelectedTextContents
fun getSelectedTextContents(): MutableList<PdfPageTextContent!>
Returns the text content within the selection boundaries on the page. In case there are non-continuous selections, this method returns the list of those text content in order of viewing.
| Return | |
|---|---|
MutableList<PdfPageTextContent!> | 
            list of text contents within the selection boundaries. This value cannot be null. | 
          
getStart
fun getStart(): SelectionBoundary
Gets the edge from where the selection starts- index is inclusive.
| Return | |
|---|---|
SelectionBoundary | 
            The starting edge of the selection. This value cannot be null. | 
          
getStop
fun getStop(): SelectionBoundary
Gets the edge where the selection stops - index is inclusive.
| Return | |
|---|---|
SelectionBoundary | 
            The stopping edge of the selection. This value cannot be null. | 
          
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest | 
            Parcel: This value cannot be null. | 
          
flags | 
            Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
          
Properties
CREATOR
static val CREATOR: Parcelable.Creator<PageSelection!>