Highlights.GetRanges(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns ranges of the i-th highlight.
[Android.Runtime.Register("getRanges", "(I)[I", "GetGetRanges_IHandler", ApiSince=34)]
public virtual int[] GetRanges (int index);
[<Android.Runtime.Register("getRanges", "(I)[I", "GetGetRanges_IHandler", ApiSince=34)>]
abstract member GetRanges : int -> int[]
override this.GetRanges : int -> int[]
Parameters
- index
- Int32
an index of the highlight. Must be between 0 and #getSize()
Returns
the flattened ranges.
- Attributes
Remarks
Returns ranges of the i-th highlight.
Ranges are represented of flattened inclusive start and exclusive end integers array. The inclusive start offset of the i
-th range is stored in 2 * i
-th of the array. The exclusive end offset of the i
-th range is stored in 2* i + 1
-th of the array. For example, the two ranges: (1, 2) and (3, 4) are flattened into single int array [1, 2, 3, 4].
Java documentation for android.text.Highlights.getRanges(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.