/frameworks/base/core/tests/coretests/src/android/text/ |
D | SpannableTest.java | 41 Spannable spannable = newSpannableWithText("abcdef"); in testGetSpans() local 43 spannable.setSpan(emptySpan, 1, 1, 0); in testGetSpans() 45 spannable.setSpan(unemptySpan, 1, 2, 0); in testGetSpans() 52 spans = spannable.getSpans(0, 1, Object.class); in testGetSpans() 54 spans = spannable.getSpans(0, 2, Object.class); in testGetSpans() 56 spans = spannable.getSpans(1, 2, Object.class); in testGetSpans() 58 spans = spannable.getSpans(2, 2, Object.class); in testGetSpans() 64 Spannable spannable = newSpannableWithText("abcdef"); in testRemoveSpanWithIntermediateFlag() local 66 spannable.setSpan(emptySpan, 1, 1, 0); in testRemoveSpanWithIntermediateFlag() 68 spannable.setSpan(unemptySpan, 1, 2, 0); in testRemoveSpanWithIntermediateFlag() [all …]
|
D | DynamicLayoutTest.java | 198 final SpannableStringBuilder spannable = new SpannableStringBuilder(text); in testReflow_afterSpannableEdit() local 199 spannable.setSpan(new MockReplacementSpan(), 4, 6, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testReflow_afterSpannableEdit() 200 spannable.setSpan(new MockReplacementSpan(), 10, length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testReflow_afterSpannableEdit() 202 final DynamicLayout layout = new DynamicLayout(spannable, new TextPaint(), WIDTH, in testReflow_afterSpannableEdit() 205 spannable.delete(8, 9); in testReflow_afterSpannableEdit() 206 spannable.replace(7, 8, "ch"); in testReflow_afterSpannableEdit() 208 layout.reflow(spannable, 0, length, length); in testReflow_afterSpannableEdit()
|
/frameworks/base/core/tests/coretests/src/android/text/util/ |
D | LinkifyTest.java | 111 Spannable spannable = new SpannableString("any https://android.com any android.com any"); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() local 112 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, null, null, null); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() 114 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() 122 Spannable spannable = new SpannableString("any https://android.com any android.com any"); in testAddLinks_addsLinksWhenSchemesArrayIsNull() local 123 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", null, null); in testAddLinks_addsLinksWhenSchemesArrayIsNull() 125 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_addsLinksWhenSchemesArrayIsNull() 134 Spannable spannable = new SpannableString("any android.com any"); in testAddLinks_prependsDefaultSchemeToBeginingOfLink() local 135 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", in testAddLinks_prependsDefaultSchemeToBeginingOfLink() 138 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_prependsDefaultSchemeToBeginingOfLink() 145 Spannable spannable = new SpannableString("any https://android.com any"); in testAddLinks_doesNotPrependSchemeIfSchemeExists() local [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/span/ |
D | SpanHelper.java | 30 public static void replaceSpan(Spannable spannable, Object oldSpan, Object newSpan) { in replaceSpan() argument 31 final int spanStart = spannable.getSpanStart(oldSpan); in replaceSpan() 32 final int spanEnd = spannable.getSpanEnd(oldSpan); in replaceSpan() 33 spannable.removeSpan(oldSpan); in replaceSpan() 34 spannable.setSpan(newSpan, spanStart, spanEnd, 0); in replaceSpan()
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | NonEditableTextGenerator.java | 68 final Spannable spannable = (mTextType == TextType.SPANNABLE_BUILDER) ? in createSpannable() local 73 spannable.setSpan(new BulletSpan(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 76 spannable.setSpan(new Object(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 77 spannable.setSpan(new Object(), 0, 1, SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 79 return spannable; in createSpannable()
|
/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/ |
D | RichTextView.java | 66 final SpannableString spannable = new SpannableString(text); in getRichText() local 67 final Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 86 return spannable; in getRichText()
|
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/ |
D | RichTextView.java | 66 final SpannableString spannable = new SpannableString(text); in getRichText() local 67 final Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 86 return spannable; in getRichText()
|
/frameworks/base/core/java/android/text/util/ |
D | Linkify.java | 467 SpannableString spannable = SpannableString.valueOf(text.getText()); in addLinks() local 469 boolean linksAdded = addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, in addLinks() 472 text.setText(spannable); in addLinks() 508 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 511 return addLinks(spannable, pattern, scheme, null, matchFilter, in addLinks() 533 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 536 return addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, transformFilter, in addLinks() 558 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 562 if (spannable != null && containsUnsupportedCharacters(spannable.toString())) { in addLinks() 581 Matcher m = pattern.matcher(spannable); in addLinks() [all …]
|
/frameworks/base/core/tests/coretests/src/android/text/method/ |
D | EditorState.java | 147 final Spannable spannable = new SpannableString(sb.toString()); in setByString() local 169 spannable.setSpan(mockReplacementSpan, replacementSpanStart, replacementSpanEnd, in setByString() 172 mText = Editable.Factory.getInstance().newEditable(spannable); in setByString()
|
/frameworks/base/core/java/android/view/textclassifier/ |
D | TextClassifier.java | 738 final Spannable spannable = new SpannableString(string); in addLinks() local 739 if (Linkify.addLinks(spannable, linkMask(entityType))) { in addLinks() 740 final URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in addLinks() 743 spannable.getSpanStart(urlSpan), in addLinks() 744 spannable.getSpanEnd(urlSpan), in addLinks()
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | RecipientEditTextView.java | 1429 Spannable spannable = getSpannable(); in sanitizeEnd() local 1434 end = spannable.getSpanEnd(mMoreChip); in sanitizeEnd() 2316 final Spannable spannable = getSpannable(); in getSortedRecipients() local 2321 int firstStart = spannable.getSpanStart(first); in getSortedRecipients() 2322 int secondStart = spannable.getSpanStart(second); in getSortedRecipients() 2445 Spannable spannable = getSpannable(); in createMoreChip() local 2456 totalReplaceStart = spannable.getSpanStart(recipients[i]); in createMoreChip() 2459 totalReplaceEnd = spannable.getSpanEnd(recipients[i]); in createMoreChip() 2462 int spanStart = spannable.getSpanStart(recipients[i]); in createMoreChip() 2463 int spanEnd = spannable.getSpanEnd(recipients[i]); in createMoreChip() [all …]
|
/frameworks/ex/common/java/com/android/ex/editstyledtext/ |
D | EditStyledText.java | 1774 Spannable spannable = (Spannable) txt; in dumpSpannableString() local 1775 int len = spannable.length(); in dumpSpannableString() 1777 Log.d(TAG, "--- dumpSpannableString, txt:" + spannable + ", len:" + len); in dumpSpannableString() 1779 Object[] styles = spannable.getSpans(0, len, Object.class); in dumpSpannableString() 1784 + spannable.getSpanStart(style) + "," in dumpSpannableString() 1785 + spannable.getSpanEnd(style) + "," in dumpSpannableString() 1786 + spannable.getSpanFlags(style)); in dumpSpannableString() 2509 public HorizontalLineSpan(int color, int width, Spannable spannable) { in HorizontalLineSpan() argument 2511 mDrawable = new HorizontalLineDrawable(color, width, spannable); in HorizontalLineSpan() 2703 public HorizontalLineDrawable(int color, int width, Spannable spannable) { in HorizontalLineDrawable() argument [all …]
|
/frameworks/base/core/java/android/widget/ |
D | AutoCompleteTextView.java | 1115 Editable spannable = getText(); in replaceText() local 1116 Selection.setSelection(spannable, spannable.length()); in replaceText()
|
D | Editor.java | 1361 Spannable spannable = (Spannable) text; in downgradeEasyCorrectionSpans() local 1362 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, in downgradeEasyCorrectionSpans() 1363 spannable.length(), SuggestionSpan.class); in downgradeEasyCorrectionSpans() 2286 final Spannable spannable = (Spannable) text; in shouldOfferToShowSuggestions() 2289 final SuggestionSpan[] suggestionSpans = spannable.getSpans(selectionStart, selectionEnd, in shouldOfferToShowSuggestions() 2309 final int spanStart = spannable.getSpanStart(suggestionSpans[i]); in shouldOfferToShowSuggestions() 2310 final int spanEnd = spannable.getSpanEnd(suggestionSpans[i]); in shouldOfferToShowSuggestions() 2345 Spannable spannable = (Spannable) mTextView.getText(); in isCursorInsideEasyCorrectionSpan() local 2346 SuggestionSpan[] suggestionSpans = spannable.getSpans(mTextView.getSelectionStart(), in isCursorInsideEasyCorrectionSpan() 3460 Spannable spannable = (Spannable) mTextView.getText(); in getSortedSuggestionSpans() local [all …]
|
D | TextView.java | 5897 void removeMisspelledSpans(Spannable spannable) { in removeMisspelledSpans() argument 5898 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, spannable.length(), in removeMisspelledSpans() 5904 spannable.removeSpan(suggestionSpans[i]); in removeMisspelledSpans() 6485 Spannable spannable; in removeSuggestionSpans() local 6487 spannable = (Spannable) text; in removeSuggestionSpans() 6489 spannable = mSpannableFactory.newSpannable(text); in removeSuggestionSpans() 6492 SuggestionSpan[] spans = spannable.getSpans(0, text.length(), SuggestionSpan.class); in removeSuggestionSpans() 6496 text = spannable; in removeSuggestionSpans() 6500 spannable.removeSpan(spans[i]); in removeSuggestionSpans() 8695 static void removeParcelableSpans(Spannable spannable, int start, int end) { in removeParcelableSpans() argument [all …]
|
/frameworks/base/core/java/android/view/accessibility/ |
D | AccessibilityNodeInfo.java | 2630 Spannable spannable = new SpannableStringBuilder(text); in setText() local 2638 int spanToReplaceStart = spannable.getSpanStart(span); in setText() 2639 int spanToReplaceEnd = spannable.getSpanEnd(span); in setText() 2640 int spanToReplaceFlags = spannable.getSpanFlags(span); in setText() 2641 spannable.removeSpan(span); in setText() 2645 spannable.setSpan(replacementSpan, spanToReplaceStart, spanToReplaceEnd, in setText() 2648 mText = spannable; in setText()
|
/frameworks/base/media/java/android/media/ |
D | ClosedCaptionRenderer.java | 1406 Spannable spannable = (Spannable) text; in setBackgroundSpans() local 1407 Cea608CCParser.MutableBackgroundColorSpan[] bgSpans = spannable.getSpans( in setBackgroundSpans() 1408 0, spannable.length(), Cea608CCParser.MutableBackgroundColorSpan.class); in setBackgroundSpans()
|
/frameworks/base/telephony/java/android/telephony/ |
D | PhoneNumberUtils.java | 2539 Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); in createTtsSpannable() local 2540 PhoneNumberUtils.addTtsSpan(spannable, 0, spannable.length()); in createTtsSpannable() 2541 return spannable; in createTtsSpannable()
|