Home
last modified time | relevance | path

Searched refs:Spanned (Results 1 – 25 of 54) sorted by relevance

123

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/
DLocaleSpanCompatUtilsTests.java26 import android.text.Spanned;
53 private static void assertLocaleSpan(final Spanned spanned, final int index, in assertLocaleSpan()
63 private static void assertSpanEquals(final Object expectedSpan, final Spanned spanned, in assertSpanEquals()
69 private static void assertSpanCount(final int expectedCount, final Spanned spanned) { in assertSpanCount()
85 assertLocaleSpan(text, 0, 1, 5, Locale.JAPANESE, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
92 text.setSpan(styleSpan, 0, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
96 assertLocaleSpan(text, 1, 1, 5, Locale.JAPANESE, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
103 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
106 assertLocaleSpan(text, 0, 1, 5, Locale.JAPANESE, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
113 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
[all …]
DSuggestionSpanUtilsTest.java25 import android.text.Spanned;
70 if (!(actualText instanceof Spanned)) { in assertNotSuggestionSpan()
73 final Spanned spanned = (Spanned)actualText; in assertNotSuggestionSpan()
84 assertTrue(actualText instanceof Spanned); in assertSuggestionSpan()
85 final Spanned spanned = (Spanned)actualText; in assertSuggestionSpan()
120 Spanned.SPAN_COMPOSING | Spanned.SPAN_EXCLUSIVE_EXCLUSIVE /* requiredSpanFlags */, in testGetTextWithAutoCorrectionIndicatorUnderline()
136 Spanned.SPAN_COMPOSING | Spanned.SPAN_EXCLUSIVE_EXCLUSIVE /* requiredSpanFlags */, in testGetTextWithAutoCorrectionIndicatorUnderlineRootLocale()
220 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE /* requiredSpanFlags */, in testGetTextWithSuggestionSpan()
230 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE /* requiredSpanFlags */, in testGetTextWithSuggestionSpan()
DTextInfoCompatUtilsTests.java24 import android.text.Spanned;
49 final private static int TEST_STYLE_SPAN_FLAGS = Spanned.SPAN_EXCLUSIVE_INCLUSIVE;
53 final private static int TEST_URL_SPAN_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
66 final Spanned expectedSpanned = (Spanned) text.subSequence(TEST_CHAR_SEQUENCE_START, in testGetCharSequence()
76 assertTrue("should be Spanned", actualCharSequence instanceof Spanned); in testGetCharSequence()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DSpannableStringUtilsTests.java25 import android.text.Spanned;
54 new String[] {"" + i}, Spanned.SPAN_PARAGRAPH), in testConcatWithSuggestionSpansOnly()
55 i * 12, i * 12 + 12, Spanned.SPAN_PARAGRAPH); in testConcatWithSuggestionSpansOnly()
64 final Spanned result = in testConcatWithSuggestionSpansOnly()
65 (Spanned)SpannableStringUtils.concatWithNonParagraphSuggestionSpansOnly(a, b); in testConcatWithSuggestionSpansOnly()
71 flags & Spanned.SPAN_PARAGRAPH, 0); in testConcatWithSuggestionSpansOnly()
78 if (cs instanceof Spanned) { in assertSpanCount()
79 final Spanned spanned = (Spanned) cs; in assertSpanCount()
89 assertTrue(cs instanceof Spanned); in assertSpan()
90 final Spanned spanned = (Spanned) cs; in assertSpan()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DSpannableStringUtils.java21 import android.text.Spanned;
49 public static void copyNonParagraphSuggestionSpansFrom(Spanned source, int start, int end, in copyNonParagraphSuggestionSpansFrom()
60 fl &= ~Spanned.SPAN_PARAGRAPH; in copyNonParagraphSuggestionSpansFrom()
93 if (text[i] instanceof Spanned) { in concatWithNonParagraphSuggestionSpansOnly()
113 if (text[i] instanceof Spanned) { in concatWithNonParagraphSuggestionSpansOnly()
114 copyNonParagraphSuggestionSpansFrom((Spanned) text[i], 0, len, ss, off); in concatWithNonParagraphSuggestionSpansOnly()
125 if (!(text instanceof Spanned)) { in hasUrlSpans()
128 final Spanned spanned = (Spanned)text; in hasUrlSpans()
153 if (!(charSequence instanceof Spanned)) { in split()
DTextRange.java19 import android.text.Spanned;
54 if (!(mTextAtCursor instanceof Spanned && mWord instanceof Spanned)) { in getSuggestionSpansAtWord()
57 final Spanned text = (Spanned)mTextAtCursor; in getSuggestionSpansAtWord()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
DLocaleSpanCompatUtils.java20 import android.text.Spanned;
131 isStartExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == in updateLocaleSpan()
132 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in updateLocaleSpan()
136 isEndExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == in updateLocaleSpan()
137 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in updateLocaleSpan()
205 return (originalFlag & ~Spanned.SPAN_POINT_MARK_MASK) | in getSpanFlag()
212 return isEndExclusive ? Spanned.SPAN_EXCLUSIVE_EXCLUSIVE in getSpanPointMarkFlag()
213 : Spanned.SPAN_EXCLUSIVE_INCLUSIVE; in getSpanPointMarkFlag()
215 return isEndExclusive ? Spanned.SPAN_INCLUSIVE_EXCLUSIVE in getSpanPointMarkFlag()
216 : Spanned.SPAN_INCLUSIVE_INCLUSIVE; in getSpanPointMarkFlag()
DSuggestionSpanUtils.java22 import android.text.Spanned;
69 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); in getTextWithAutoCorrectionIndicatorUnderline()
98 spannable.setSpan(suggestionSpan, 0, pickedWord.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in getTextWithSuggestionSpan()
/packages/apps/Contacts/tests/src/com/android/contacts/format/
DSpannedTestUtils.java21 import android.text.Spanned;
39 String actualHtmlText = Html.toHtml((Spanned) textView.getText()); in checkHtmlText()
57 Assert.assertTrue(seq instanceof Spanned); in assertPrefixSpan()
58 Spanned spannable = (Spanned) seq; in assertPrefixSpan()
68 private static int getNumForegroundColorSpansBetween(Spanned value, int start, int end) { in getNumForegroundColorSpansBetween()
79 Assert.assertFalse(seq instanceof Spanned); in assertNotSpanned()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DAccessibilityContextMenuMaker.java23 import android.text.Spanned;
91 Spanned spanned = getText(textView); in populateMenuContent()
117 private @Nullable Spanned getText(TextView textView) { in getText()
119 return (text instanceof Spanned) ? (Spanned) text : null; in getText()
122 private @NonNull ClickableSpan[] getSpans(Spanned spanned) { in getSpans()
DHtmlToSpannedParser.java18 import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
26 import android.text.Spanned;
56 public Spanned parseHtml(String htmlContent) { in parseHtml()
57 Spanned spanned = Html.fromHtml(checkStringNotEmpty(htmlContent), HTML_MODE); in parseHtml()
/packages/apps/Dialer/java/com/android/dialer/spannable/
DContentWithLearnMoreSpanner.java21 import android.text.Spanned;
84 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in create()
90 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in create()
/packages/apps/Dialer/java/com/android/dialer/voicemail/listui/error/
DVoicemailTosMessageCreator.java31 import android.text.Spanned;
498 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
511 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
529 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
544 spannable.setSpan(new URLSpan(linkUrl), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
549 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
/packages/apps/Dialer/java/com/android/dialer/searchfragment/common/
DQueryBoldingUtil.java24 import android.text.Spanned;
109 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in getNameWithInitialsBolded()
164 new StyleSpan(Typeface.BOLD), index, index + numBolded, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in getBoldedString()
/packages/apps/Dialer/java/com/android/dialer/dialpadview/
DUnicodeDialerKeyListener.java20 import android.text.Spanned;
34 CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { in filter()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/
DGrantPermissionsWatchViewHandler.java15 import android.text.Spanned;
118 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in showDialog()
123 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in showDialog()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DLevenshteinFormatterTest.java24 import android.text.Spanned;
152 Spanned s = mFormatter.formatSuggestion(query, suggestion); in verifyFormatSuggestion()
350 public void verify(Spanned spanned) { in verify()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DUtf8ByteLengthFilter.java20 import android.text.Spanned;
50 Spanned dest, int dstart, int dend) { in filter()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DUtf8ByteLengthFilter.java20 import android.text.Spanned;
51 Spanned dest, int dstart, int dend) { in filter()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/bluetooth/
DUtf8ByteLengthFilter.java20 import android.text.Spanned;
51 Spanned dest, int dstart, int dend) { in filter()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/terms/adapters/
DTermsAdapterUtils.java20 import android.text.Spanned;
47 Spanned content = htmlToSpannedParser.parseHtml(disclaimer.getContent()); in populateContentTextView()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DHtmlToSpannedParserTest.java22 import android.text.Spanned;
71 Spanned spanned = mHtmlToSpannedParser.parseHtml(inputHtml); in assertRawTextCorrect()
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/activity/
DAddAssociatedDeviceFragment.java26 import android.text.Spanned;
70 Spanned styledSelectText = Html.fromHtml(selectText, Html.FROM_HTML_MODE_LEGACY); in setDeviceNameForAssociation()
/packages/apps/TV/src/com/android/tv/guide/
DProgramItemView.java29 import android.text.Spanned;
374 description.setSpan(titleStyle, 0, middle, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in updateText()
376 episodeStyle, middle, description.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in updateText()
379 titleStyle, 0, description.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in updateText()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DLevenshteinSuggestionFormatter.java24 import android.text.Spanned;
40 public Spanned formatSuggestion(String query, String suggestion) { in formatSuggestion()

123