Home
last modified time | relevance | path

Searched refs:spannable (Results 1 – 18 of 18) sorted by relevance

/aosp14/frameworks/base/core/java/android/text/style/
H A DSpanUtils.java65 spannable.setSpan( in toggleBold()
74 final int end = spannable.getSpanEnd(span); in toggleBold()
75 final int flag = spannable.getSpanFlags(span); in toggleBold()
112 spannable.removeSpan(span); in toggleBold()
151 spannable.setSpan( in toggleItalic()
160 final int end = spannable.getSpanEnd(span); in toggleItalic()
198 spannable.removeSpan(span); in toggleItalic()
230 if (!isCovered(spannable, spans, min, max)) { in toggleUnderline()
239 final int end = spannable.getSpanEnd(span); in toggleUnderline()
265 spannable.removeSpan(span); in toggleUnderline()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/text/
H A DDynamicLayoutOffsetMappingTest.java69 spannable.delete(2, 3); in textWithOffsetMapping_deletion()
74 spannable.delete(2, 3); in textWithOffsetMapping_deletion()
79 spannable.delete(1, 3); in textWithOffsetMapping_deletion()
96 spannable.insert(3, "x"); in textWithOffsetMapping_insertion()
100 spannable.insert(5, "x"); in textWithOffsetMapping_insertion()
117 spannable.replace(2, 4, "xx"); in textWithOffsetMapping_replace()
136 spannable.delete(2, 4); in textWithOffsetMapping_blockBeforeTextChanged_deletion()
141 spannable.delete(0, 3); in textWithOffsetMapping_blockBeforeTextChanged_deletion()
158 spannable.insert(3, "x"); in textWithOffsetMapping_blockBeforeTextChanged_insertion()
162 spannable.insert(5, "x"); in textWithOffsetMapping_blockBeforeTextChanged_insertion()
[all …]
H A DSpannableTest.java41 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()
66 spannable.setSpan(emptySpan, 1, 1, 0); in testRemoveSpanWithIntermediateFlag()
68 spannable.setSpan(unemptySpan, 1, 2, 0); in testRemoveSpanWithIntermediateFlag()
84 spannable.setSpan(watcher, 0, 2, 0); in testRemoveSpanWithIntermediateFlag()
[all …]
H A DDynamicLayoutTest.java198 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()
/aosp14/frameworks/base/core/tests/coretests/src/android/text/util/
H A DLinkifyTest.java111 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()
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
146 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", in testAddLinks_doesNotPrependSchemeIfSchemeExists()
[all …]
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/text/
H A DNonEditableTextGenerator.java68 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()
/aosp14/frameworks/base/core/java/android/text/util/
H A DLinkify.java475 SpannableString spannable = SpannableString.valueOf(text.getText()); in addLinks() local
477 boolean linksAdded = addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, in addLinks()
480 text.setText(spannable); in addLinks()
516 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument
519 return addLinks(spannable, pattern, scheme, null, matchFilter, in addLinks()
541 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument
566 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument
570 if (spannable != null && containsUnsupportedCharacters(spannable.toString())) { in addLinks()
589 Matcher m = pattern.matcher(spannable); in addLinks()
597 allowed = matchFilter.acceptMatch(spannable, start, end); in addLinks()
[all …]
/aosp14/frameworks/base/core/java/android/widget/
H A DEditText.java254 Spannable spannable = getText(); in performStylingAction() local
256 return SpanUtils.toggleBold(spannable, min, max); in performStylingAction()
258 return SpanUtils.toggleItalic(spannable, min, max); in performStylingAction()
260 return SpanUtils.toggleUnderline(spannable, min, max); in performStylingAction()
H A DAutoCompleteTextView.java1131 Editable spannable = getText(); in replaceText() local
1132 Selection.setSelection(spannable, spannable.length()); in replaceText()
H A DEditor.java1678 Spannable spannable = (Spannable) text; in downgradeEasyCorrectionSpans() local
1679 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, in downgradeEasyCorrectionSpans()
1680 spannable.length(), SuggestionSpan.class); in downgradeEasyCorrectionSpans()
2625 final Spannable spannable = (Spannable) text; in shouldOfferToShowSuggestions()
2684 Spannable spannable = (Spannable) mTextView.getText(); in isCursorInsideEasyCorrectionSpan() local
3944 Spannable spannable = (Spannable) mTextView.getText(); in getSortedSuggestionSpans() local
3949 int start = spannable.getSpanStart(suggestionSpan); in getSortedSuggestionSpans()
3950 int end = spannable.getSpanEnd(suggestionSpan); in getSortedSuggestionSpans()
3973 final Spannable spannable = (Spannable) mTextView.getText(); in getSuggestionInfo() local
4314 Spannable spannable = (Spannable) mTextView.getText(); in updateSuggestions() local
[all …]
H A DTextView.java6792 void removeMisspelledSpans(Spannable spannable) { in removeMisspelledSpans() argument
6793 SuggestionSpan[] suggestionSpans = spannable.getSpans(0, spannable.length(), in removeMisspelledSpans()
6799 spannable.removeSpan(suggestionSpans[i]); in removeMisspelledSpans()
7437 Spannable spannable; in removeSuggestionSpans() local
7439 spannable = (Spannable) text; in removeSuggestionSpans()
7441 spannable = mSpannableFactory.newSpannable(text); in removeSuggestionSpans()
7448 text = spannable; in removeSuggestionSpans()
7452 spannable.removeSpan(spans[i]); in removeSuggestionSpans()
9849 static void removeParcelableSpans(Spannable spannable, int start, int end) { in removeParcelableSpans() argument
9850 Object[] spans = spannable.getSpans(start, end, ParcelableSpan.class); in removeParcelableSpans()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/text/method/
H A DEditorState.java147 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()
/aosp14/frameworks/base/core/java/android/view/textclassifier/
H A DTextClassifier.java758 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()
/aosp14/frameworks/base/core/java/android/text/method/
H A DInsertModeTransformationMethod.java137 final Spannable spannable = (Spannable) source; in getTransformation() local
138 spannable.setSpan(mOldTransformationMethod, 0, spannable.length(), in getTransformation()
/aosp14/frameworks/base/core/java/android/view/accessibility/
H A DAccessibilityNodeInfo.java3217 Spannable spannable = new SpannableStringBuilder(text); in replaceClickableSpan() local
3228 int spanToReplaceStart = spannable.getSpanStart(span); in replaceClickableSpan()
3229 int spanToReplaceEnd = spannable.getSpanEnd(span); in replaceClickableSpan()
3230 int spanToReplaceFlags = spannable.getSpanFlags(span); in replaceClickableSpan()
3234 spannable.removeSpan(span); in replaceClickableSpan()
3241 return spannable; in replaceClickableSpan()
3268 int spanToReplaceStart = spannable.getSpanStart(span); in replaceReplacementSpan()
3269 int spanToReplaceEnd = spannable.getSpanEnd(span); in replaceReplacementSpan()
3270 int spanToReplaceFlags = spannable.getSpanFlags(span); in replaceReplacementSpan()
3274 spannable.removeSpan(span); in replaceReplacementSpan()
[all …]
/aosp14/frameworks/base/media/java/android/media/
H A DClosedCaptionRenderer.java1406 Spannable spannable = (Spannable) text; in setBackgroundSpans() local
1407 Cea608CCParser.MutableBackgroundColorSpan[] bgSpans = spannable.getSpans( in setBackgroundSpans()
1408 0, spannable.length(), Cea608CCParser.MutableBackgroundColorSpan.class); in setBackgroundSpans()
/aosp14/frameworks/base/telephony/java/android/telephony/
H A DPhoneNumberUtils.java2181 Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); in createTtsSpannable() local
2182 PhoneNumberUtils.addTtsSpan(spannable, 0, spannable.length()); in createTtsSpannable()
2183 return spannable; in createTtsSpannable()
/aosp14/frameworks/base/tools/aapt2/integration-tests/CommandTests/
H A Dandroid-33.jarAndroidManifest.xml META-INF/ META-INF/MANIFEST.MF NOTICES/ NOTICES/libcore ...