Home
last modified time | relevance | path

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

12345

/frameworks/base/core/tests/coretests/src/android/text/
DSpannedStringNoCopyTest.java39 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
40 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
41 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
53 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
54 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
55 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
71 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_copyNoCopySpans_OtherSpannedImpl()
72 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_copyNoCopySpans_OtherSpannedImpl()
73 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_copyNoCopySpans_OtherSpannedImpl()
85 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_doesNotCopyNoCopySpans_OtherSpannedImpl()
[all …]
DSpannableStringNoCopyTest.java39 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
40 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
41 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_copyNoCopySpans_SpannableStringInternalImpl()
53 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
54 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
55 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_doesNotCopyNoCopySpans_SpannableStringInternalImpl()
71 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_copyNoCopySpans_OtherSpannableImpl()
72 first.setSpan(new NoCopySpan.Concrete(), 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopyConstructor_copyNoCopySpans_OtherSpannableImpl()
73 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_copyNoCopySpans_OtherSpannableImpl()
85 first.setSpan(new QuoteSpan(), 0, 2, Spanned.SPAN_PARAGRAPH); in testCopyConstructor_doesNotCopyNoCopySpans_OtherSpannableImpl()
[all …]
DSpanColorsTest.java48 Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in setup()
50 Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in setup()
51 mSpannedText.setSpan(new UnderlineSpan(), 5, 10, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in setup()
53 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in setup()
55 Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in setup()
DSpannableStringBuilderTest.java52 builder.setSpan(first, 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
53 builder.setSpan(second, 1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
54 builder.setSpan(third, 2, text.length(), 1 << Spanned.SPAN_PRIORITY_SHIFT); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
55 builder.setSpan(fourth, 0, text.length(), 2 << Spanned.SPAN_PRIORITY_SHIFT); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
DTextUtilsTest.java79 assertEquals(1, ((Spanned) TextUtils.concat(foo)).getSpanStart("foo")); in testBasic()
81 assertEquals(1, ((Spanned) TextUtils.concat(foo, bar)).getSpanStart("foo")); in testBasic()
82 assertEquals(4, ((Spanned) TextUtils.concat(foo, bar)).getSpanStart("bar")); in testBasic()
84 assertEquals(1, ((Spanned) TextUtils.concat(foo, bar, baz)).getSpanStart("foo")); in testBasic()
85 assertEquals(4, ((Spanned) TextUtils.concat(foo, bar, baz)).getSpanStart("bar")); in testBasic()
86 assertEquals(7, ((Spanned) TextUtils.concat(foo, bar, baz)).getSpanStart("baz")); in testBasic()
156 private void checkContains(Spanned text, String[] spans, String spanName, in checkContains()
171 Spanned result; in testTemplateSpan()
182 result = (Spanned) TextUtils.expandTemplate(template, "foo"); in testTemplateSpan()
196 result = (Spanned) TextUtils.expandTemplate(template, ""); in testTemplateSpan()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/method/
DInsertModeTransformationMethodTest.java25 import android.text.Spanned;
95 text.setSpan(transformationMethod, 0, text.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in transformedText_charAt_editing()
209 text.setSpan(span1, 0, 3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans()
210 text.setSpan(span2, 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans()
211 text.setSpan(span3, 4, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans()
219 final Spanned transformedText = in transformedText_getSpans()
220 (Spanned) transformationMethod.getTransformation(text, sView); in transformedText_getSpans()
267 text.setSpan(span1, 0, 3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans_singleLine()
268 text.setSpan(span2, 2, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans_singleLine()
269 text.setSpan(span3, 4, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in transformedText_getSpans_singleLine()
[all …]
/frameworks/base/core/java/android/text/
DInputFilter.java51 Spanned dest, int dstart, int dend); in filter()
76 Spanned dest, int dstart, int dend) { in filter()
94 final boolean copySpans = source instanceof Spanned; in filter()
106 private static class CharSequenceWrapper implements CharSequence, Spanned {
141 return ((Spanned) mSource).getSpans(mStart + start, mStart + end, type); in getSpans()
145 return ((Spanned) mSource).getSpanStart(tag) - mStart; in getSpanStart()
149 return ((Spanned) mSource).getSpanEnd(tag) - mStart; in getSpanEnd()
153 return ((Spanned) mSource).getSpanFlags(tag); in getSpanFlags()
157 return ((Spanned) mSource).nextSpanTransition(mStart + start, mStart + limit, type) in nextSpanTransition()
175 public CharSequence filter(CharSequence source, int start, int end, Spanned dest, in filter()
DSelection.java42 if (text instanceof Spanned) { in getSelectionStart()
43 return ((Spanned) text).getSpanStart(SELECTION_START); in getSelectionStart()
53 if (text instanceof Spanned) { in getSelectionEnd()
54 return ((Spanned) text).getSpanStart(SELECTION_END); in getSelectionEnd()
60 if (text instanceof Spanned) { in getSelectionMemory()
61 return ((Spanned) text).getSpanStart(SELECTION_MEMORY); in getSelectionMemory()
96 Spanned.SPAN_POINT_POINT | Spanned.SPAN_INTERMEDIATE); in setSelection()
97 text.setSpan(SELECTION_END, stop, stop, Spanned.SPAN_POINT_POINT); in setSelection()
111 text.setSpan(SELECTION_MEMORY, memory, memory, Spanned.SPAN_POINT_POINT); in updateMemory()
115 text.setSpan(watcher, 0, text.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); in updateMemory()
[all …]
DAlteredCharSequence.java38 if (source instanceof Spanned) in make()
60 implements Spanned
65 mSpanned = (Spanned) source; in AlteredSpanned()
88 private Spanned mSpanned;
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/util/
DLinkAccessibilityHelper.java29 import android.text.Spanned;
159 if (text instanceof Spanned) { in getVirtualViewAt()
160 final Spanned spannedText = (Spanned) text; in getVirtualViewAt()
174 if (text instanceof Spanned) { in getVisibleVirtualViews()
175 final Spanned spannedText = (Spanned) text; in getVisibleVirtualViews()
233 if (text instanceof Spanned) { in getSpanForOffset()
234 Spanned spannedText = (Spanned) text; in getSpanForOffset()
245 if (text instanceof Spanned) { in getTextForSpan()
246 Spanned spannedText = (Spanned) text; in getTextForSpan()
258 if (text instanceof Spanned) { in getBoundsForSpan()
[all …]
/frameworks/base/core/java/android/text/method/
DReplacementTransformationMethod.java23 import android.text.Spanned;
82 if (source instanceof Spanned) { in getTransformation()
84 (Spanned) source, in getTransformation()
94 if (source instanceof Spanned) { in getTransformation()
95 return new SpannedReplacementCharSequence((Spanned) source, in getTransformation()
171 implements Spanned
173 public SpannedReplacementCharSequence(Spanned source, char[] original, in SpannedReplacementCharSequence()
203 private Spanned mSpanned;
DPasswordTransformationMethod.java28 import android.text.Spanned;
152 if (mSource instanceof Spanned) { in charAt()
153 Spanned sp = (Spanned) mSource; in charAt()
197 if (mSource instanceof Spanned) { in getChars()
198 Spanned sp = (Spanned) mSource; in getChars()
DInsertModeTransformationMethod.java28 import android.text.Spanned;
127 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in getPlaceholderText()
139 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in getTransformation()
196 public class TransformedText implements OffsetMapping, Spanned {
199 private final Spanned mSpannedOriginal;
200 private final Spanned mSpannedPlaceholder;
204 if (original instanceof Spanned) { in TransformedText()
205 mSpannedOriginal = (Spanned) original; in TransformedText()
210 if (placeholder instanceof Spanned) { in TransformedText()
211 mSpannedPlaceholder = (Spanned) placeholder; in TransformedText()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DTextViewTransformState.java20 import android.text.Spanned;
60 boolean hasSpans = mText instanceof Spanned; in hasSameSpans()
61 boolean otherHasSpans = otherTvs.mText instanceof Spanned; in hasSameSpans()
68 Spanned ownSpanned = (Spanned) mText; in hasSameSpans()
70 Spanned otherSpanned = (Spanned) otherTvs.mText; in hasSameSpans()
/frameworks/base/core/tests/InputMethodCoreTests/src/android/view/inputmethod/
DTextAppearanceInfoTest.java33 import android.text.Spanned;
99 mSpannableText.setSpan(sizeSpan, 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCreateFromTextView_withSpan1()
102 mSpannableText.setSpan(colorSpan, 1, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCreateFromTextView_withSpan1()
105 mSpannableText.setSpan(typefaceSpan, 2, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCreateFromTextView_withSpan1()
151 spannableText.setSpan(sizeSpan, 0, 3, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testCreateFromTextView_withSpan2()
154 spannableText.setSpan(colorSpan, 0, 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCreateFromTextView_withSpan2()
157 spannableText.setSpan(styleSpan, 1, 2, Spanned.SPAN_EXCLUSIVE_INCLUSIVE); in testCreateFromTextView_withSpan2()
160 spannableText.setSpan(typefaceSpan, 3, 3, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testCreateFromTextView_withSpan2()
163 spannableText.setSpan(scaleXSpan, 3, 3, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in testCreateFromTextView_withSpan2()
185 mSpannableText.setSpan(sizeSpan1, 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCreateFromTextView_contradictorySpans()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DContrastColorUtilTest.java31 import android.text.Spanned;
101 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_removesAllFullLengthColorSpans()
103 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testBuilder_ensureColorSpanContrast_removesAllFullLengthColorSpans()
108 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testBuilder_ensureColorSpanContrast_removesAllFullLengthColorSpans()
110 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_removesAllFullLengthColorSpans()
136 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_partialLength_adjusted()
152 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_worksWithComplexInput()
154 Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testBuilder_ensureColorSpanContrast_worksWithComplexInput()
161 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_worksWithComplexInput()
163 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testBuilder_ensureColorSpanContrast_worksWithComplexInput()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/
DRichTextViewTest.java34 import android.text.Spanned;
59 assertThat(text).isInstanceOf(Spanned.class); in testLinkAnnotation()
63 Object[] spans = ((Spanned) text).getSpans(0, text.length(), Annotation.class); in testLinkAnnotation()
66 spans = ((Spanned) text).getSpans(0, text.length(), LinkSpan.class); in testLinkAnnotation()
89 LinkSpan[] spans = ((Spanned) text).getSpans(0, text.length(), LinkSpan.class); in testOnLinkClickListener()
108 LinkSpan[] spans = ((Spanned) text).getSpans(0, text.length(), LinkSpan.class); in testLegacyContextOnClickListener()
160 assertThat(text).isInstanceOf(Spanned.class); in testTextStyle()
162 Object[] spans = ((Spanned) text).getSpans(0, text.length(), Annotation.class); in testTextStyle()
165 spans = ((Spanned) text).getSpans(0, text.length(), TextAppearanceSpan.class); in testTextStyle()
/frameworks/ex/common/java/com/android/common/
DRfc822InputFilter.java20 import android.text.Spanned;
33 public CharSequence filter(CharSequence source, int start, int end, Spanned dest, in filter()
59 if (source instanceof Spanned) { in filter()
/frameworks/base/core/java/com/android/internal/accessibility/util/
DAccessibilityUtils.java39 import android.text.Spanned;
268 if (before instanceof Spanned || after instanceof Spanned) { in textOrSpanChanged()
279 Spanned a = null; in parcelableSpansEquals()
280 Spanned b = null; in parcelableSpansEquals()
281 if (before instanceof Spanned) { in parcelableSpansEquals()
282 a = (Spanned) before; in parcelableSpansEquals()
285 if (after instanceof Spanned) { in parcelableSpansEquals()
286 b = (Spanned) after; in parcelableSpansEquals()
/frameworks/base/packages/SettingsLib/FooterPreference/src/com/android/settingslib/widget/
DLinkTextView.java19 import android.text.Spanned;
45 if (text instanceof Spanned) { in setText()
47 ((Spanned) text).getSpans(0, text.length(), ClickableSpan.class); in setText()
/frameworks/base/core/java/android/view/inputmethod/
DBaseInputConnection.java37 import android.text.Spanned;
105 if ((text.getSpanFlags(o)&Spanned.SPAN_COMPOSING) != 0) { in removeComposingSpans()
133 if ((fl & (Spanned.SPAN_COMPOSING | Spanned.SPAN_POINT_MARK_MASK)) in setComposingSpans()
134 != (Spanned.SPAN_COMPOSING | Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)) { in setComposingSpans()
139 (fl & ~Spanned.SPAN_POINT_MARK_MASK) in setComposingSpans()
140 | Spanned.SPAN_COMPOSING in setComposingSpans()
141 | Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in setComposingSpans()
147 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); in setComposingSpans()
775 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); in setComposingRegion()
780 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING); in setComposingRegion()
[all …]
/frameworks/base/core/java/android/text/style/
DAccessibilityClickableSpan.java27 import android.text.Spanned;
99 if (!(text instanceof Spanned)) { in findClickableSpan()
102 Spanned sp = (Spanned) text; in findClickableSpan()
DIconMarginSpan.java26 import android.text.Spanned;
84 int st = ((Spanned) text).getSpanStart(this); in drawLeadingMargin()
98 if (end == ((Spanned) text).getSpanEnd(this)) { in chooseHeight()
DDrawableMarginSpan.java25 import android.text.Spanned;
85 int st = ((Spanned) text).getSpanStart(this); in drawLeadingMargin()
101 if (end == ((Spanned) text).getSpanEnd(this)) { in chooseHeight()
/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/
DRichTextView.java22 import android.text.Spanned;
65 if (text instanceof Spanned) { in getRichText()
134 if (text instanceof Spanned) { in hasLinks()
136 ((Spanned) text).getSpans(0, text.length(), ClickableSpan.class); in hasLinks()

12345