Home | History | Annotate | Download | only in utils

Lines Matching defs:spans

49      * Gets the suggestion spans that are put squarely on the word, with the exact start
51 * @return the list of spans.
60 // spans were cut at the cursor position, and #getSpans(start, end) does not return
61 // spans that end at `start' or begin at `end'. Consider the following case:
69 // the 4~7 spans and we can merge them accordingly.
75 final SuggestionSpan[] spans = text.getSpans(mWordAtCursorStartIndex - 1,
79 for (; readIndex < spans.length; ++readIndex) {
80 final SuggestionSpan span = spans[readIndex];
88 for (int i = readIndex + 1; i < spans.length; ++i) {
89 if (span.equals(spans[i])) {
92 spanStart = Math.min(spanStart, text.getSpanStart(spans[i]));
93 spanEnd = Math.max(spanEnd, text.getSpanEnd(spans[i]));
95 spans[i] = null;
102 spans[writeIndex++] = spans[readIndex];
105 return writeIndex == readIndex ? spans : Arrays.copyOfRange(spans, 0, writeIndex);