SelectRangeGesture
class SelectRangeGesture : PreviewableHandwritingGesture, Parcelable
| kotlin.Any | |||
| ↳ | android.view.inputmethod.HandwritingGesture | ||
| ↳ | android.view.inputmethod.PreviewableHandwritingGesture | ||
| ↳ | android.view.inputmethod.SelectRangeGesture | ||
A subclass of HandwritingGesture for selecting a range of text by defining start and end rectangles. This can be useful when the range cannot be defined with a single rectangle. This class holds the information required for selection of text in toolkit widgets like TextView.
Note: this selects text within a range between two given areas. To select all text within a single area, use SelectGesture
Summary
| Nested classes | |
|---|---|
| Builder for | |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean | |
| Int | Returns Granular level on which text should be operated. |
| RectF | Returns the Selection end area |
| RectF | Returns the Selection start area |
| Int | hashCode() |
| Unit | writeToParcel(dest: Parcel, flags: Int)Used to package this object into a |
| Properties | |
|---|---|
| static Parcelable.Creator<SelectRangeGesture!> | Used to make this class parcelable. |
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 |
equals
fun equals(other: Any?): Boolean
| Parameters | |
|---|---|
obj | the reference object with which to compare. |
| Return | |
|---|---|
Boolean | true if this object is the same as the obj argument; false otherwise. |
getGranularity
fun getGranularity(): Int
Returns Granular level on which text should be operated.
| Return | |
|---|---|
Int | Value is android.view.inputmethod.HandwritingGesture#GRANULARITY_CHARACTER, or android.view.inputmethod.HandwritingGesture#GRANULARITY_WORD |
See Also
getSelectionEndArea
fun getSelectionEndArea(): RectF
Returns the Selection end area RectF in screen coordinates. Getter for selection area set with Builder.setSelectionEndArea(RectF).
| Return | |
|---|---|
RectF | This value cannot be null. |
getSelectionStartArea
fun getSelectionStartArea(): RectF
Returns the Selection start area RectF in screen coordinates. Getter for selection area set with Builder.setSelectionStartArea(RectF).
| Return | |
|---|---|
RectF | This value cannot be null. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Used to package this object into a Parcel.
| Parameters | |
|---|---|
dest | Parcel: The Parcel to be written. This value cannot be null. |
flags | Int: The flags used for parceling. |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SelectRangeGesture!>
Used to make this class parcelable.