Home
last modified time | relevance | path

Searched refs:spanned (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/text/
DHtmlTest.java40 Spanned spanned = Html.fromHtml("<b>hello</b>"); in testSingleTagOnWhileString() local
41 Object[] spans = spanned.getSpans(-1, 100, Object.class); in testSingleTagOnWhileString()
44 assertEquals(0, spanned.getSpanStart(span)); in testSingleTagOnWhileString()
45 assertEquals(5, spanned.getSpanEnd(span)); in testSingleTagOnWhileString()
50 Spanned spanned = Html.fromHtml("Hello <font color=\"#ff00ff00\"></font>"); in testEmptyFontTag() local
51 Object[] spans = spanned.getSpans(0, 100, Object.class); in testEmptyFontTag()
58 Spanned spanned = Html.fromHtml("Hello <b>b<i>bi</b>i</i>"); in testBadHtml() local
59 Object[] spans = spanned.getSpans(0, 100, Object.class); in testBadHtml()
61 assertEquals(7, spanned.getSpanStart(spans[0])); in testBadHtml()
62 assertEquals(9, spanned.getSpanEnd(spans[0])); in testBadHtml()
[all …]
DTextUtilsTest.java424 MockSpanned spanned = new MockSpanned(); in testRemoveEmptySpans() local
426 spanned.test(); in testRemoveEmptySpans()
427 spanned.addSpan().test(); in testRemoveEmptySpans()
428 spanned.addSpan().test(); in testRemoveEmptySpans()
429 spanned.addSpan().test(); in testRemoveEmptySpans()
430 spanned.addEmptySpan().test(); in testRemoveEmptySpans()
431 spanned.addSpan().test(); in testRemoveEmptySpans()
432 spanned.addEmptySpan().test(); in testRemoveEmptySpans()
433 spanned.addEmptySpan().test(); in testRemoveEmptySpans()
434 spanned.addSpan().test(); in testRemoveEmptySpans()
[all …]
/frameworks/base/core/java/android/text/
DStaticLayout.java174 Spanned spanned = null; in generate() local
176 spanned = (Spanned) source; in generate()
194 if (spanned != null) { in generate()
195 LeadingMarginSpan[] sp = getParagraphSpans(spanned, paraStart, paraEnd, in generate()
208 int lmsFirstLine = getLineForOffset(spanned.getSpanStart(lms2)); in generate()
213 chooseHt = getParagraphSpans(spanned, paraStart, paraEnd, LineHeightSpan.class); in generate()
223 int o = spanned.getSpanStart(chooseHt[i]); in generate()
267 if (spanned == null) in generate()
270 spanEnd = spanned.nextSpanTransition(spanStart, paraEnd, in generate()
274 if (spanned == null) { in generate()
[all …]
DMeasuredText.java105 Spanned spanned = (Spanned) text; in setPara() local
106 ReplacementSpan[] spans = spanned.getSpans(start, end, in setPara()
110 int startInPara = spanned.getSpanStart(spans[i]) - start; in setPara()
111 int endInPara = spanned.getSpanEnd(spans[i]) - start; in setPara()
DLayout.java459 Spanned spanned = (Spanned) mText; in getLineStartPos() local
461 int spanEnd = spanned.nextSpanTransition(start, spanned.length(), in getLineStartPos()
463 … TabStopSpan[] tabSpans = getParagraphSpans(spanned, start, spanEnd, TabStopSpan.class); in getLineStartPos()
1451 Spanned spanned = (Spanned) mText; in getParagraphLeadingMargin() local
1455 int spanEnd = spanned.nextSpanTransition(lineStart, lineEnd, in getParagraphLeadingMargin()
1457 LeadingMarginSpan[] spans = getParagraphSpans(spanned, lineStart, spanEnd, in getParagraphLeadingMargin()
1466 spanned.charAt(lineStart - 1) == '\n'; in getParagraphLeadingMargin()
1472 int spStart = spanned.getSpanStart(span); in getParagraphLeadingMargin()
1509 Spanned spanned = (Spanned) text;
1510 int spanEnd = spanned.nextSpanTransition(start, end,
[all …]
DTextLine.java863 SpanSet(Spanned spanned, int start, int limit, Class<? extends E> type) { in SpanSet() argument
864 final E[] allSpans = spanned.getSpans(start, limit, type); in SpanSet()
876 final int spanStart = spanned.getSpanStart(span); in SpanSet()
877 final int spanEnd = spanned.getSpanEnd(span); in SpanSet()
880 final int spanFlag = spanned.getSpanFlags(span); in SpanSet()
DTextUtils.java1353 boolean spanned = false; in concat()
1356 spanned = true; in concat()
1366 if (!spanned) { in concat()
1631 public static <T> T[] removeEmptySpans(T[] spans, Spanned spanned, Class<T> klass) { in removeEmptySpans() argument
1637 final int start = spanned.getSpanStart(span); in removeEmptySpans()
1638 final int end = spanned.getSpanEnd(span); in removeEmptySpans()
/frameworks/base/core/java/com/android/internal/widget/
DEditableInputConnection.java143 Spanned spanned = ((Spanned) text); in commitText() local
144 SuggestionSpan[] spans = spanned.getSpans(0, text.length(), SuggestionSpan.class); in commitText()
/frameworks/base/core/java/android/widget/
DTextView.java5632 Spanned spanned = (Spanned)content; in extractTextInternal() local
5633 Object[] spans = spanned.getSpans(partialStartOffset, in extractTextInternal()
5638 int j = spanned.getSpanStart(spans[i]); in extractTextInternal()
5640 j = spanned.getSpanEnd(spans[i]); in extractTextInternal()
7871 private EasyEditSpan getSpan(Spanned spanned) { in getSpan() argument
7872 EasyEditSpan[] easyEditSpans = spanned.getSpans(0, spanned.length(), in getSpan()
/frameworks/ex/common/java/com/android/ex/editstyledtext/
DEditStyledText.java1926 final Spanned spanned = mHtml.fromHtml(html, new Html.ImageGetter() { in SetHtml() local
1971 mEST.setText(spanned); in SetHtml()