Home
last modified time | relevance | path

Searched refs:spans (Results 1 – 23 of 23) sorted by relevance

/packages/apps/Email/tests/src/com/android/emailcommon/utility/
DTextUtilitiesTests.java205 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightSingleTermText() local
206 assertEquals(1, spans.length); in brokentestHighlightSingleTermText()
207 BackgroundColorSpan span = spans[0]; in brokentestHighlightSingleTermText()
216 spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightSingleTermText()
217 assertEquals(2, spans.length); in brokentestHighlightSingleTermText()
218 span = spans[0]; in brokentestHighlightSingleTermText()
221 span = spans[1]; in brokentestHighlightSingleTermText()
232 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightTwoTermText() local
233 assertEquals(2, spans.length); in brokentestHighlightTwoTermText()
234 BackgroundColorSpan span = spans[0]; in brokentestHighlightTwoTermText()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DTextRange.java75 final SuggestionSpan[] spans = text.getSpans(mWordAtCursorStartIndex - 1, in getSuggestionSpansAtWord() local
79 for (; readIndex < spans.length; ++readIndex) { in getSuggestionSpansAtWord()
80 final SuggestionSpan span = spans[readIndex]; in getSuggestionSpansAtWord()
88 for (int i = readIndex + 1; i < spans.length; ++i) { in getSuggestionSpansAtWord()
89 if (span.equals(spans[i])) { in getSuggestionSpansAtWord()
92 spanStart = Math.min(spanStart, text.getSpanStart(spans[i])); in getSuggestionSpansAtWord()
93 spanEnd = Math.max(spanEnd, text.getSpanEnd(spans[i])); in getSuggestionSpansAtWord()
95 spans[i] = null; in getSuggestionSpansAtWord()
102 spans[writeIndex++] = spans[readIndex]; in getSuggestionSpansAtWord()
105 return writeIndex == readIndex ? spans : Arrays.copyOfRange(spans, 0, writeIndex); in getSuggestionSpansAtWord()
DSpannableStringUtils.java45 Object[] spans = source.getSpans(start, end, SuggestionSpan.class); in copyNonParagraphSuggestionSpansFrom() local
47 for (int i = 0; i < spans.length; i++) { in copyNonParagraphSuggestionSpansFrom()
48 int fl = source.getSpanFlags(spans[i]); in copyNonParagraphSuggestionSpansFrom()
56 int st = source.getSpanStart(spans[i]); in copyNonParagraphSuggestionSpansFrom()
57 int en = source.getSpanEnd(spans[i]); in copyNonParagraphSuggestionSpansFrom()
64 dest.setSpan(spans[i], st - start + destoff, en - start + destoff, in copyNonParagraphSuggestionSpansFrom()
125 final URLSpan[] spans = spanned.getSpans(startIndex - 1, endIndex + 1, URLSpan.class); in hasUrlSpans() local
126 return null != spans && spans.length > 0; in hasUrlSpans()
DCursorAnchorInfoUtils.java122 final Object[] spans = spannable.getSpans(0, text.length(), Object.class); in getCursorAnchorInfo() local
123 for (Object span : spans) { in getCursorAnchorInfo()
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DConversationItemView.java1052 CharacterStyle[] spans = toHeader.getSpans(0, toHeader.length(), in elideParticipants() local
1056 if (spans.length > 0) { in elideParticipants()
1057 spans[0].updateDrawState(sPaint); in elideParticipants()
1066 CharacterStyle[] spans = messageInfoString.getSpans(0, messageInfoString.length(), in elideParticipants() local
1070 if (spans.length > 0) { in elideParticipants()
1071 spans[0].updateDrawState(sPaint); in elideParticipants()
1088 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class); in elideParticipants() local
1090 if (spans.length > 0) { in elideParticipants()
1091 spans[0].updateDrawState(sPaint); in elideParticipants()
1096 sender = copyStyles(spans, sElidedPaddingToken + sender + sElidedPaddingToken); in elideParticipants()
[all …]
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DLevenshteinFormatterTest.java151 private void verifyFormatSuggestion(String query, String suggestion, SpanFormat... spans) { in verifyFormatSuggestion() argument
153 for (SpanFormat span : spans) { in verifyFormatSuggestion()
353 MockStyleSpan[] spans = spanned.getSpans(mStart, mEnd, MockStyleSpan.class); in verify() local
354 assertEquals("Wrong number of spans in '" + spannedText + "'", 1, spans.length); in verify()
356 mStyle, spans[0].getId()); in verify()
/packages/apps/UnifiedEmail/src/com/android/mail/widget/
DWidgetService.java462 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class);
465 sender = copyStyles(spans, mElidedPaddingToken + sender + mElidedPaddingToken);
470 sender = copyStyles(spans, mSendersSplitToken + sender);
480 private static SpannableString copyStyles(CharacterStyle[] spans, CharSequence newText) { in copyStyles() argument
482 if (spans != null && spans.length > 0) { in copyStyles()
483 s.setSpan(spans[0], 0, s.length(), 0); in copyStyles()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DInputTestsBase.java83 final CharacterStyle[] spans = in SpanGetter() local
85 if (0 == spans.length) { in SpanGetter()
89 } else if (1 == spans.length) { in SpanGetter()
90 mSpan = spans[0]; in SpanGetter()
94 throw new RuntimeException("Expected one span, found " + spans.length); in SpanGetter()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DSpannableStringUtilsTests.java50 Object[] spans = result.getSpans(0, result.length(), SuggestionSpan.class); in testConcatWithSuggestionSpansOnly() local
51 for (int i = 0; i < spans.length; i++) { in testConcatWithSuggestionSpansOnly()
52 final int flags = result.getSpanFlags(spans[i]); in testConcatWithSuggestionSpansOnly()
55 assertTrue("Should be a SuggestionSpan", spans[i] instanceof SuggestionSpan); in testConcatWithSuggestionSpansOnly()
/packages/apps/Mms/src/com/android/mms/ui/
DMessageListItem.java621 final URLSpan[] spans = mBodyTextView.getUrls(); in onMessageListItemClick() local
623 if (spans.length == 0) { in onMessageListItemClick()
625 } else if (spans.length == 1) { in onMessageListItemClick()
626 spans[0].onClick(mBodyTextView); in onMessageListItemClick()
629 new ArrayAdapter<URLSpan>(mContext, android.R.layout.select_dialog_item, spans) { in onMessageListItemClick()
670 spans[which].onClick(mBodyTextView); in onMessageListItemClick()
DMessageUtils.java848 public static ArrayList<String> extractUris(URLSpan[] spans) { in extractUris() argument
849 int size = spans.length; in extractUris()
853 accumulator.add(spans[i].getURL()); in extractUris()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/
DLocaleSpanCompatUtilsTests.java56 final Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in assertSpanEquals() local
57 assertEquals(expectedSpan, spans[index]); in assertSpanEquals()
61 final Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in assertSpanCount() local
62 assertEquals(expectedCount, spans.length); in assertSpanCount()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DEllipsizedMultilineTextView.java102 final Object[] spans = s.getSpans(0, s.length(), Object.class); in setText() local
104 for (int i = 0; i < spans.length; i++) { in setText()
105 final Object span = spans[i]; in setText()
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
DNotificationUtils.java1395 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class); in ellipsizeStyledSenders() local
1398 sender = copyStyles(spans, sElidedPaddingToken + sender + sElidedPaddingToken); in ellipsizeStyledSenders()
1403 sender = copyStyles(spans, sSendersSplitToken + sender); in ellipsizeStyledSenders()
1412 private static SpannableString copyStyles(CharacterStyle[] spans, CharSequence newText) { in copyStyles() argument
1414 if (spans != null && spans.length > 0) { in copyStyles()
1415 s.setSpan(spans[0], 0, s.length(), 0); in copyStyles()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSuggestionFormatter.java52 private void setSpans(Spannable text, int start, int end, Object[] spans) { in setSpans() argument
53 for (Object span : spans) { in setSpans()
/packages/apps/Calendar/src/com/android/calendar/
DUtils.java1785 URLSpan[] spans = spanText.getSpans(0, spanText.length(), URLSpan.class); in extendedLinkify() local
1786 if (spans.length == 1) { in extendedLinkify()
1787 int linkStart = spanText.getSpanStart(spans[0]); in extendedLinkify()
1788 int linkEnd = spanText.getSpanEnd(spans[0]); in extendedLinkify()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/
DInputLogic.java1578 final Object[] spans = committedWordWithSuggestionSpans.getSpans(0, in revertCommit() local
1585 for (final Object span : spans) { in revertCommit()
/packages/apps/Launcher3/src/com/android/launcher3/
DCellLayout.java2954 int[] spans = rectToCell(minWidth, minHeight, null); in calculateSpans() local
2955 info.spanX = spans[0]; in calculateSpans()
2956 info.spanY = spans[1]; in calculateSpans()
/packages/apps/Launcher2/src/com/android/launcher2/
DCellLayout.java3038 int[] spans = rectToCell(minWidth, minHeight, null); in calculateSpans() local
3039 info.spanX = spans[0]; in calculateSpans()
3040 info.spanY = spans[1]; in calculateSpans()
/packages/inputmethods/LatinIME/dictionaries/
Den_US_wordlist.combined.gz1dictionary=main:en_us,locale=en_US,description=English (US),date ...
Den_GB_wordlist.combined.gz1dictionary=main:en_gb,locale=en_GB,description=English (UK),date ...
Dpt_BR_wordlist.combined.gz1dictionary=main:pt_br,locale=pt_BR,description=Português (Brasil),date ...
Den_wordlist.combined.gz1dictionary=main:en,locale=en,description=English,date=1402373178, ...