/frameworks/base/core/tests/coretests/src/android/text/ |
D | SpannableTest.java | 36 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()
|
D | HtmlTest.java | 41 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 …]
|
D | TextUtilsTest.java | 136 private void checkContains(Spanned text, String[] spans, String spanName, in checkContains() argument 138 for (String i: spans) { in checkContains() 152 String[] spans; in testTemplateSpan() local 164 spans = result.getSpans(0, result.length(), String.class); in testTemplateSpan() 167 assertEquals(4, spans.length); in testTemplateSpan() 168 checkContains(result, spans, "before", 0, 1); in testTemplateSpan() 169 checkContains(result, spans, "during", 1, 4); in testTemplateSpan() 170 checkContains(result, spans, "after", 4, 5); in testTemplateSpan() 171 checkContains(result, spans, "during+after", 1, 5); in testTemplateSpan() 178 spans = result.getSpans(0, result.length(), String.class); in testTemplateSpan() [all …]
|
D | SpannedTest.java | 121 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/ |
D | SpannableStringInternal.java | 38 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 …]
|
D | SpanSet.java | 34 E[] spans; field in SpanSet 49 if (length > 0 && (spans == null || spans.length < length)) { in init() 51 spans = (E[]) Array.newInstance(classType, length); in init() 67 spans[numberOfSpans] = span; in init() 108 spans[i] = null; // prevent a leak: no reference kept when TextLine is recycled in recycle()
|
D | SpannableStringBuilder.java | 72 Object[] spans = sp.getSpans(start, end, Object.class); in SpannableStringBuilder() local 74 for (int i = 0; i < spans.length; i++) { in SpannableStringBuilder() 75 if (spans[i] instanceof NoCopySpan) { in SpannableStringBuilder() 79 int st = sp.getSpanStart(spans[i]) - start; in SpannableStringBuilder() 80 int en = sp.getSpanEnd(spans[i]) - start; in SpannableStringBuilder() 81 int fl = sp.getSpanFlags(spans[i]); in SpannableStringBuilder() 93 setSpan(false, spans[i], st, en, fl); in SpannableStringBuilder() 361 Object[] spans = sp.getSpans(csStart, csEnd, Object.class); in change() local 363 for (int i = 0; i < spans.length; i++) { in change() 364 int st = sp.getSpanStart(spans[i]); in change() [all …]
|
D | Layout.java | 214 ParagraphStyle[] spans = NO_PARA_SPANS; in drawText() local 259 spans = getParagraphSpans(sp, start, spanEnd, ParagraphStyle.class); in drawText() 262 for (int n = spans.length - 1; n >= 0; n--) { in drawText() 263 if (spans[n] instanceof AlignmentSpan) { in drawText() 264 paraAlign = ((AlignmentSpan) spans[n]).getAlignment(); in drawText() 274 final int length = spans.length; in drawText() 276 if (spans[n] instanceof LeadingMarginSpan) { in drawText() 277 LeadingMarginSpan margin = (LeadingMarginSpan) spans[n]; in drawText() 304 tabStops = new TabStops(TAB_INCREMENT, spans); in drawText() 306 tabStops.reset(TAB_INCREMENT, spans); in drawText() [all …]
|
D | MeasuredText.java | 110 ReplacementSpan[] spans = spanned.getSpans(start, end, in setPara() local 113 for (int i = 0; i < spans.length; i++) { in setPara() 114 int startInPara = spanned.getSpanStart(spans[i]) - start; in setPara() 115 int endInPara = spanned.getSpanEnd(spans[i]) - start; in setPara() 184 float addStyleRun(TextPaint paint, MetricAffectingSpan[] spans, int len, in addStyleRun() argument 193 for (int i = 0; i < spans.length; i++) { in addStyleRun() 194 MetricAffectingSpan span = spans[i]; in addStyleRun()
|
D | TextUtils.java | 930 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, in getOffsetBefore() local 933 for (int i = 0; i < spans.length; i++) { in getOffsetBefore() 934 int start = ((Spanned) text).getSpanStart(spans[i]); in getOffsetBefore() 935 int end = ((Spanned) text).getSpanEnd(spans[i]); in getOffsetBefore() 967 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, in getOffsetAfter() local 970 for (int i = 0; i < spans.length; i++) { in getOffsetAfter() 971 int start = ((Spanned) text).getSpanStart(spans[i]); in getOffsetAfter() 972 int end = ((Spanned) text).getSpanEnd(spans[i]); in getOffsetAfter() 1004 Object[] spans = source.getSpans(start, end, kind); in copySpansFrom() local 1006 for (int i = 0; i < spans.length; i++) { in copySpansFrom() [all …]
|
D | TextLine.java | 644 MetricAffectingSpan[] spans = mSpanned.getSpans(mStart + spanStart, in getOffsetBeforeAfter() local 646 spans = TextUtils.removeEmptySpans(spans, mSpanned, MetricAffectingSpan.class); in getOffsetBeforeAfter() 648 if (spans.length > 0) { in getOffsetBeforeAfter() 650 for (int j = 0; j < spans.length; j++) { in getOffsetBeforeAfter() 651 MetricAffectingSpan span = spans[j]; in getOffsetBeforeAfter() 926 MetricAffectingSpan span = mMetricAffectingSpanSpanSet.spans[j]; in handleRun() 952 CharacterStyle span = mCharacterStyleSpanSet.spans[k]; in handleRun() 1006 MetricAffectingSpan[] spans = mSpanned.getSpans(pos, pos + 1, MetricAffectingSpan.class); in ascent() local 1007 if (spans.length == 0) { in ascent() 1013 for (MetricAffectingSpan span : spans) { in ascent()
|
D | StaticLayout.java | 278 MetricAffectingSpan[] spans = in generate() local 280 spans = TextUtils.removeEmptySpans(spans, spanned, MetricAffectingSpan.class); in generate() 281 measured.addStyleRun(paint, spans, spanLen, fm); in generate() 300 TabStopSpan[] spans = getParagraphSpans(spanned, paraStart, in generate() local 302 if (spans.length > 0) { in generate() 303 tabStops = new TabStops(TAB_INCREMENT, spans); in generate()
|
D | DynamicLayout.java | 178 ChangeWatcher[] spans = sp.getSpans(0, sp.length(), ChangeWatcher.class); in DynamicLayout() local 179 for (int i = 0; i < spans.length; i++) in DynamicLayout() 180 sp.removeSpan(spans[i]); in DynamicLayout()
|
/frameworks/base/core/jni/ |
D | android_util_StringBlock.cpp | 107 const ResStringPool_span* spans = osb->styleAt(idx); in android_content_StringBlock_nativeGetStyle() local 108 if (spans == NULL) { in android_content_StringBlock_nativeGetStyle() 112 const ResStringPool_span* pos = spans; in android_content_StringBlock_nativeGetStyle() 130 while (spans->name.index != ResStringPool_span::END) { in android_content_StringBlock_nativeGetStyle() 133 (jint*)spans); in android_content_StringBlock_nativeGetStyle() 134 spans++; in android_content_StringBlock_nativeGetStyle()
|
/frameworks/base/tools/aapt/ |
D | StringPool.h | 76 entry_style(const entry_style& o) : offset(o.offset), spans(o.spans) { } in entry_style() 79 Vector<entry_style_span> spans; member 99 ssize_t add(const String16& value, const Vector<entry_style_span>& spans, 104 status_t addStyleSpans(size_t idx, const Vector<entry_style_span>& spans);
|
D | StringPool.cpp | 109 ssize_t StringPool::add(const String16& value, const Vector<entry_style_span>& spans, in add() argument 114 addStyleSpans(res, spans); in add() 166 mEntryStyleArray[pos].spans.size() : 0; in add() 192 status_t StringPool::addStyleSpans(size_t idx, const Vector<entry_style_span>& spans) in addStyleSpans() argument 194 const size_t N=spans.size(); in addStyleSpans() 196 status_t err = addStyleSpan(idx, spans[i]); in addStyleSpans() 212 style.spans.add(span); in addStyleSpan() 316 if (style.spans.size() > 0) { in sortByConfig() 385 const size_t N = style.spans.size(); in writeStringBlock() 387 entry_style_span& span = style.spans.editItemAt(i); in writeStringBlock() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | EditableInputConnection.java | 178 SuggestionSpan[] spans = spanned.getSpans(0, text.length(), SuggestionSpan.class); in commitText() local 179 mIMM.registerSuggestionSpansForNotification(spans); in commitText()
|
/frameworks/base/docs/html/guide/ |
D | guide_toc.cs | 5 Below are template spans for adding localized doc titles. Please ensure that
|
/frameworks/ex/chips/tests/src/com/android/ex/chips/ |
D | ChipsTest.java | 649 DrawableRecipientChip[] spans = in testReplaceChip() local 651 assertEquals(spans.length, 3); in testReplaceChip() 652 spans = mEditable in testReplaceChip() 654 assertEquals((String) spans[0].getDisplay(), "replacement"); in testReplaceChip() 683 spans = mEditable.getSpans(0, mEditable.length(), DrawableRecipientChip.class); in testReplaceChip() 684 assertEquals(spans.length, 3); in testReplaceChip() 685 spans = mEditable.getSpans(firstEnd, mEditable.toString().indexOf(third) - 1, in testReplaceChip() 687 assertEquals((String) spans[0].getDisplay(), "replacement"); in testReplaceChip() 713 spans = mEditable.getSpans(0, mEditable.length(), DrawableRecipientChip.class); in testReplaceChip() 714 assertEquals(spans.length, 3); in testReplaceChip() [all …]
|
/frameworks/base/core/java/com/android/internal/view/ |
D | IInputMethodManager.aidl | 66 void registerSuggestionSpansForNotification(in SuggestionSpan[] spans); in registerSuggestionSpansForNotification() argument
|
/frameworks/base/core/java/android/widget/ |
D | SpellChecker.java | 744 private <T> void removeSpansAt(Editable editable, int offset, T[] spans) { in removeSpansAt() argument 745 final int length = spans.length; in removeSpansAt() 747 final T span = spans[i]; in removeSpansAt()
|
D | TextView.java | 3913 SuggestionSpan[] spans = spannable.getSpans(0, text.length(), SuggestionSpan.class); in removeSuggestionSpans() local 3914 for (int i = 0; i < spans.length; i++) { in removeSuggestionSpans() 3915 spannable.removeSpan(spans[i]); in removeSuggestionSpans() 5680 Object[] spans = spannable.getSpans(start, end, ParcelableSpan.class); in removeParcelableSpans() local 5681 int i = spans.length; in removeParcelableSpans() 5684 spannable.removeSpan(spans[i]); in removeParcelableSpans() 7283 T[] spans = text.getSpans(start, end, type); in removeIntersectingSpans() local 7284 final int length = spans.length; in removeIntersectingSpans() 7286 final int s = text.getSpanStart(spans[i]); in removeIntersectingSpans() 7287 final int e = text.getSpanEnd(spans[i]); in removeIntersectingSpans() [all …]
|
D | GridLayout.java | 1293 MutableInt[] spans = links.values; in computeLinks() local 1294 for (int i = 0; i < spans.length; i++) { in computeLinks() 1295 spans[i].reset(); in computeLinks()
|
/frameworks/ex/common/java/com/android/ex/editstyledtext/ |
D | EditStyledText.java | 878 ForegroundColorSpan[] spans = in getForegroundColor() local 880 if (spans.length > 0) { in getForegroundColor() 881 return spans[0].getForegroundColor(); in getForegroundColor() 2743 ForegroundColorSpan[] spans = in renewColor() local 2746 Log.d(LOG_TAG, "--- renewColor:" + spans.length); in renewColor() 2748 if (spans.length > 0) { in renewColor() 2749 renewColor(spans[spans.length - 1].getForegroundColor()); in renewColor()
|
/frameworks/base/core/java/android/view/inputmethod/ |
D | InputMethodManager.java | 653 public void registerSuggestionSpansForNotification(SuggestionSpan[] spans) { in registerSuggestionSpansForNotification() argument 655 mService.registerSuggestionSpansForNotification(spans); in registerSuggestionSpansForNotification()
|