/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 | 469 SpannableString spannable = SpannableString.valueOf(text.getText()); in addLinks() local 471 boolean linksAdded = addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, in addLinks() 474 text.setText(spannable); in addLinks() 510 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 513 return addLinks(spannable, pattern, scheme, null, matchFilter, in addLinks() 535 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 538 return addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, transformFilter, in addLinks() 560 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 564 if (spannable != null && containsUnsupportedCharacters(spannable.toString())) { in addLinks() 583 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 | 758 final Spannable spannable = new SpannableString(string); in addLinks() local 759 if (Linkify.addLinks(spannable, linkMask(entityType))) { in addLinks() 760 final URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in addLinks() 763 spannable.getSpanStart(urlSpan), in addLinks() 764 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/base/core/java/android/view/accessibility/ |
D | AccessibilityNodeInfo.java | 2907 Spannable spannable = new SpannableStringBuilder(text); in replaceClickableSpan() local 2918 int spanToReplaceStart = spannable.getSpanStart(span); in replaceClickableSpan() 2919 int spanToReplaceEnd = spannable.getSpanEnd(span); in replaceClickableSpan() 2920 int spanToReplaceFlags = spannable.getSpanFlags(span); in replaceClickableSpan() 2921 spannable.removeSpan(span); in replaceClickableSpan() 2925 spannable.setSpan(replacementSpan, spanToReplaceStart, spanToReplaceEnd, in replaceClickableSpan() 2928 return spannable; in replaceClickableSpan() 2941 SpannableStringBuilder spannable = new SpannableStringBuilder(text); in replaceReplacementSpan() local 2955 int spanToReplaceStart = spannable.getSpanStart(span); in replaceReplacementSpan() 2956 int spanToReplaceEnd = spannable.getSpanEnd(span); in replaceReplacementSpan() [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 | 1116 Editable spannable = getText(); in replaceText() local 1117 Selection.setSelection(spannable, spannable.length()); in replaceText()
|
D | Editor.java | 1594 Spannable spannable = (Spannable) text; in downgradeEasyCorrectionSpans() local 1595 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, in downgradeEasyCorrectionSpans() 1596 spannable.length(), SuggestionSpan.class); in downgradeEasyCorrectionSpans() 2520 final Spannable spannable = (Spannable) text; in shouldOfferToShowSuggestions() 2523 final SuggestionSpan[] suggestionSpans = spannable.getSpans(selectionStart, selectionEnd, in shouldOfferToShowSuggestions() 2543 final int spanStart = spannable.getSpanStart(suggestionSpans[i]); in shouldOfferToShowSuggestions() 2544 final int spanEnd = spannable.getSpanEnd(suggestionSpans[i]); in shouldOfferToShowSuggestions() 2579 Spannable spannable = (Spannable) mTextView.getText(); in isCursorInsideEasyCorrectionSpan() local 2580 SuggestionSpan[] suggestionSpans = spannable.getSpans(mTextView.getSelectionStart(), in isCursorInsideEasyCorrectionSpan() 3702 Spannable spannable = (Spannable) mTextView.getText(); in getSortedSuggestionSpans() local [all …]
|
D | TextView.java | 6022 void removeMisspelledSpans(Spannable spannable) { in removeMisspelledSpans() argument 6023 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, spannable.length(), in removeMisspelledSpans() 6029 spannable.removeSpan(suggestionSpans[i]); in removeMisspelledSpans() 6614 Spannable spannable; in removeSuggestionSpans() local 6616 spannable = (Spannable) text; in removeSuggestionSpans() 6618 spannable = mSpannableFactory.newSpannable(text); in removeSuggestionSpans() 6621 SuggestionSpan[] spans = spannable.getSpans(0, text.length(), SuggestionSpan.class); in removeSuggestionSpans() 6625 text = spannable; in removeSuggestionSpans() 6629 spannable.removeSpan(spans[i]); in removeSuggestionSpans() 8813 static void removeParcelableSpans(Spannable spannable, int start, int end) { in removeParcelableSpans() argument [all …]
|
/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 | 2543 Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); in createTtsSpannable() local 2544 PhoneNumberUtils.addTtsSpan(spannable, 0, spannable.length()); in createTtsSpannable() 2545 return spannable; in createTtsSpannable()
|