Home
last modified time | relevance | path

Searched refs:spans (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/text/
DSpannableTest.java36 Object[] spans; in testGetSpans() local
41 spans = spannable.getSpans(0, 1, Object.class); in testGetSpans()
42 MoreAsserts.assertEquals(new Object[]{emptySpan}, spans); in testGetSpans()
43 spans = spannable.getSpans(0, 2, Object.class); in testGetSpans()
44 MoreAsserts.assertEquals(new Object[]{emptySpan, unemptySpan}, spans); in testGetSpans()
45 spans = spannable.getSpans(1, 2, Object.class); in testGetSpans()
46 MoreAsserts.assertEquals(new Object[]{emptySpan, unemptySpan}, spans); in testGetSpans()
47 spans = spannable.getSpans(2, 2, Object.class); in testGetSpans()
48 MoreAsserts.assertEquals(new Object[]{unemptySpan}, spans); in testGetSpans()
DHtmlTest.java41 Object[] spans = spanned.getSpans(-1, 100, Object.class); in testSingleTagOnWhileString() local
42 assertEquals(1, spans.length); in testSingleTagOnWhileString()
43 Object span = spans[0]; in testSingleTagOnWhileString()
51 Object[] spans = spanned.getSpans(0, 100, Object.class); in testEmptyFontTag() local
59 Object[] spans = spanned.getSpans(0, 100, Object.class); in testBadHtml() local
60 assertEquals(Typeface.ITALIC, ((StyleSpan) spans[0]).getStyle()); in testBadHtml()
61 assertEquals(7, spanned.getSpanStart(spans[0])); in testBadHtml()
62 assertEquals(9, spanned.getSpanEnd(spans[0])); in testBadHtml()
63 assertEquals(Typeface.BOLD, ((StyleSpan) spans[1]).getStyle()); in testBadHtml()
64 assertEquals(6, spanned.getSpanStart(spans[1])); in testBadHtml()
[all …]
DTextUtilsTest.java143 private void checkContains(Spanned text, String[] spans, String spanName, in checkContains() argument
145 for (String i: spans) { in checkContains()
159 String[] spans; in testTemplateSpan() local
171 spans = result.getSpans(0, result.length(), String.class); in testTemplateSpan()
174 assertEquals(4, spans.length); in testTemplateSpan()
175 checkContains(result, spans, "before", 0, 1); in testTemplateSpan()
176 checkContains(result, spans, "during", 1, 4); in testTemplateSpan()
177 checkContains(result, spans, "after", 4, 5); in testTemplateSpan()
178 checkContains(result, spans, "during+after", 1, 5); in testTemplateSpan()
185 spans = result.getSpans(0, result.length(), String.class); in testTemplateSpan()
[all …]
DSpannedTest.java121 Object[] spans = s.getSpans(0, s.length(), Object.class); in checkPriority() local
123 for (int i = 0; i < spans.length - 1; i++) { in checkPriority()
124 assertEquals((s.getSpanFlags(spans[i]) & Spanned.SPAN_PRIORITY) >= in checkPriority()
125 (s.getSpanFlags(spans[i + 1]) & Spanned.SPAN_PRIORITY), in checkPriority()
/frameworks/base/core/java/android/text/
DSpannableStringInternal.java38 Object[] spans = sp.getSpans(start, end, Object.class); in SpannableStringInternal() local
40 for (int i = 0; i < spans.length; i++) { in SpannableStringInternal()
41 int st = sp.getSpanStart(spans[i]); in SpannableStringInternal()
42 int en = sp.getSpanEnd(spans[i]); in SpannableStringInternal()
43 int fl = sp.getSpanFlags(spans[i]); in SpannableStringInternal()
50 setSpan(spans[i], st - start, en - start, fl); in SpannableStringInternal()
100 Object[] spans = mSpans; in setSpan() local
104 if (spans[i] == what) { in setSpan()
141 Object[] spans = mSpans; in removeSpan() local
145 if (spans[i] == what) { in removeSpan()
[all …]
DSpannableStringBuilder.java70 Object[] spans = sp.getSpans(start, end, Object.class); in SpannableStringBuilder() local
72 for (int i = 0; i < spans.length; i++) { in SpannableStringBuilder()
73 if (spans[i] instanceof NoCopySpan) { in SpannableStringBuilder()
77 int st = sp.getSpanStart(spans[i]) - start; in SpannableStringBuilder()
78 int en = sp.getSpanEnd(spans[i]) - start; in SpannableStringBuilder()
79 int fl = sp.getSpanFlags(spans[i]); in SpannableStringBuilder()
91 setSpan(spans[i], st, en, fl); in SpannableStringBuilder()
329 Object[] spans = sp.getSpans(tbstart, tbend, Object.class); in change() local
331 for (int i = 0; i < spans.length; i++) { in change()
332 int st = sp.getSpanStart(spans[i]); in change()
[all …]
DStyled.java61 CharacterStyle[] spans = text.getSpans(start, end, CharacterStyle.class); in drawUniformRun() local
72 if (spans.length > 0) { in drawUniformRun()
73 for (int i = 0; i < spans.length; i++) { in drawUniformRun()
74 CharacterStyle span = spans[i]; in drawUniformRun()
190 MetricAffectingSpan[] spans = in getTextWidths() local
196 for (int i = 0; i < spans.length; i++) { in getTextWidths()
197 MetricAffectingSpan span = spans[i]; in getTextWidths()
DLayout.java200 ParagraphStyle[] spans = NO_PARA_SPANS; in draw() local
223 spans = sp.getSpans(start, spanend, in draw()
227 for (int n = 0; n < spans.length; n++) { in draw()
228 LineBackgroundSpan back = (LineBackgroundSpan) spans[n]; in draw()
240 spans = NO_PARA_SPANS; in draw()
284 spans = sp.getSpans(start, spanend, ParagraphStyle.class); in draw()
287 for (int n = spans.length-1; n >= 0; n--) { in draw()
288 if (spans[n] instanceof AlignmentSpan) { in draw()
289 align = ((AlignmentSpan) spans[n]).getAlignment(); in draw()
303 final int length = spans.length; in draw()
[all …]
DTextUtils.java863 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, in getOffsetBefore() local
866 for (int i = 0; i < spans.length; i++) { in getOffsetBefore()
867 int start = ((Spanned) text).getSpanStart(spans[i]); in getOffsetBefore()
868 int end = ((Spanned) text).getSpanEnd(spans[i]); in getOffsetBefore()
900 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, in getOffsetAfter() local
903 for (int i = 0; i < spans.length; i++) { in getOffsetAfter()
904 int start = ((Spanned) text).getSpanStart(spans[i]); in getOffsetAfter()
905 int end = ((Spanned) text).getSpanEnd(spans[i]); in getOffsetAfter()
937 Object[] spans = source.getSpans(start, end, kind); in copySpansFrom() local
939 for (int i = 0; i < spans.length; i++) { in copySpansFrom()
[all …]
DDynamicLayout.java158 ChangeWatcher[] spans = sp.getSpans(0, sp.length(), ChangeWatcher.class); in DynamicLayout() local
159 for (int i = 0; i < spans.length; i++) in DynamicLayout()
160 sp.removeSpan(spans[i]); in DynamicLayout()
DStaticLayout.java242 ReplacementSpan[] spans = sp.getSpans(start, end, ReplacementSpan.class); in generate() local
244 for (int y = 0; y < spans.length; y++) { in generate()
245 int a = sp.getSpanStart(spans[y]); in generate()
246 int b = sp.getSpanEnd(spans[y]); in generate()
/frameworks/base/tools/aapt/
DStringPool.h59 entry_style(const entry_style& o) : offset(o.offset), spans(o.spans) { } in entry_style()
62 Vector<entry_style_span> spans; member
89 ssize_t add(const String16& value, const Vector<entry_style_span>& spans);
96 status_t addStyleSpans(size_t idx, const Vector<entry_style_span>& spans);
DStringPool.cpp47 ssize_t StringPool::add(const String16& value, const Vector<entry_style_span>& spans) in add() argument
51 addStyleSpans(res, spans); in add()
119 status_t StringPool::addStyleSpans(size_t idx, const Vector<entry_style_span>& spans) in addStyleSpans() argument
121 const size_t N=spans.size(); in addStyleSpans()
123 status_t err = addStyleSpan(idx, spans[i]); in addStyleSpans()
141 style.spans.add(span); in addStyleSpan()
204 const size_t N = style.spans.size(); in writeStringBlock()
206 entry_style_span& span = style.spans.editItemAt(i); in writeStringBlock()
297 const size_t N = ent.spans.size(); in writeStringBlock()
309 span->name.index = htodl(ent.spans[i].span.name.index); in writeStringBlock()
[all …]
DResourceTable.cpp586 Vector<StringPool::entry_style_span> spans; in parseAndAddBag() local
588 block, item16, &str, &spans, isFormatted, in parseAndAddBag()
606 &spans, &config, overwrite, false, curFormat); in parseAndAddBag()
656 Vector<StringPool::entry_style_span> spans; in parseAndAddEntry() local
658 curTag, &str, curIsStyled ? &spans : NULL, in parseAndAddEntry()
713 myPackage, curType, ident, str, &spans, &config, in parseAndAddEntry()
/frameworks/base/core/jni/
Dandroid_util_StringBlock.cpp115 const ResStringPool_span* spans = osb->styleAt(idx); in android_content_StringBlock_nativeGetStyle() local
116 if (spans == NULL) { in android_content_StringBlock_nativeGetStyle()
120 const ResStringPool_span* pos = spans; in android_content_StringBlock_nativeGetStyle()
139 while (spans->name.index != ResStringPool_span::END) { in android_content_StringBlock_nativeGetStyle()
142 (jint*)spans); in android_content_StringBlock_nativeGetStyle()
143 spans++; in android_content_StringBlock_nativeGetStyle()
/frameworks/base/core/java/com/android/internal/widget/
DEditStyledText.java488 ForegroundColorSpan[] spans = in getForeGroundColor() local
490 if (spans.length > 0) { in getForeGroundColor()
491 return spans[0].getForegroundColor(); in getForeGroundColor()
1638 … ForegroundColorSpan[] spans = text.getSpans(start, start, ForegroundColorSpan.class); in renewColor() local
1639 if (spans.length > 0) { in renewColor()
1640 renewColor(spans[spans.length - 1].getForegroundColor()); in renewColor()
/frameworks/base/docs/html/guide/
Dguide_toc.cs5 Below are template spans for adding localized doc titles. Please ensure that
/frameworks/base/core/java/android/widget/
DTextView.java4672 Object[] spans = spanned.getSpans(partialStartOffset, in extractTextInternal() local
4674 int i = spans.length; in extractTextInternal()
4677 int j = spanned.getSpanStart(spans[i]); in extractTextInternal()
4679 j = spanned.getSpanEnd(spans[i]); in extractTextInternal()
4766 Object[] spans = spannable.getSpans(start, end, ParcelableSpan.class); in removeParcelableSpans() local
4767 int i = spans.length; in removeParcelableSpans()
4770 spannable.removeSpan(spans[i]); in removeParcelableSpans()
/frameworks/base/docs/html/sdk/
Dandroid-3.0-highlights.jd186 …location, while also unifying the experience of using an application that spans multiple Activitie…
/frameworks/base/tests/DumpRenderTree/assets/results/
Dlayout_tests_failed.txt70 /sdcard/android/layout_tests/editing/execCommand/convert-style-elements-to-spans.html
Dlayout_tests_nontext.txt9 /sdcard/android/layout_tests/accessibility/table-cell-spans.html
1006 /sdcard/android/layout_tests/editing/pasteboard/display-block-on-spans.html
/frameworks/base/docs/html/guide/topics/resources/
Ddrawable-resource.jd1496 <td>A horizontal line that spans the width of the containing View. This
/frameworks/base/docs/html/guide/practices/
Dscreens_support.jd182 <p>Each generalized screen configuration spans a range of actual screen