/frameworks/base/core/tests/coretests/src/android/text/ |
SpannableTest.java | 36 Object[] spans; local 38 // Empty spans are included when they merely abut the query region 39 // but other spans are not, unless the query region is empty, in 40 // in which case any abutting spans are returned. 41 spans = spannable.getSpans(0, 1, Object.class); 42 MoreAsserts.assertEquals(new Object[]{emptySpan}, spans); 43 spans = spannable.getSpans(0, 2, Object.class); 44 MoreAsserts.assertEquals(new Object[]{emptySpan, unemptySpan}, spans); 45 spans = spannable.getSpans(1, 2, Object.class); 46 MoreAsserts.assertEquals(new Object[]{emptySpan, unemptySpan}, spans); [all...] |
HtmlTest.java | 41 Object[] spans = spanned.getSpans(-1, 100, Object.class); local 42 assertEquals(1, spans.length); 43 Object span = spans[0]; 51 Object[] spans = spanned.getSpans(0, 100, Object.class); local 52 // TODO: figure out what the spans should be after the crashes are fixed and assert them. 59 Object[] spans = spanned.getSpans(0, 100, Object.class); local 60 assertEquals(Typeface.ITALIC, ((StyleSpan) spans[0]).getStyle()); 61 assertEquals(7, spanned.getSpanStart(spans[0])); 62 assertEquals(9, spanned.getSpanEnd(spans[0])); 63 assertEquals(Typeface.BOLD, ((StyleSpan) spans[1]).getStyle()) [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
SpannableStringTest.java | 54 Object[] spans = spanStr.getSpans(0, TEST_STRING.length(), Object.class); local 55 assertThat(spans, notNullValue()); 56 assertThat(spans.length, equalTo(1)); 57 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); 67 Object[] spans = spanStr.getSpans(0, TEST_STRING.length(), Object.class); local 68 assertThat(spans, notNullValue()); 69 assertThat(spans.length, equalTo(2)); 72 spans = spanStr.getSpans(0, TEST_STRING.length(), URLSpan.class); 73 assertThat(spans, notNullValue()); 74 assertThat(spans.length, equalTo(1)) 124 Object[] spans = spanStr.getSpans(0, TEST_STRING.length(), Object.class); local [all...] |
/cts/tests/tests/text/src/android/text/util/cts/ |
LinkifyTest.java | 80 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); local 81 assertEquals(2, spans.length); 82 assertEquals("http://www.google.com", spans[0].getURL()); 83 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); 86 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); 87 assertEquals(1, spans.length); 88 assertEquals("mailto:name@gmail.com", spans[0].getURL()); 106 URLSpan[] spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); local 107 assertEquals(1, spans.length); 108 assertEquals("http://www.google.com", spans[0].getURL()) 133 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); local 176 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); local 226 URLSpan[] spans = (spannable.getSpans(0, spannable.length(), URLSpan.class)); local 257 URLSpan[] spans = (spannable.getSpans(0, spannable.length(), URLSpan.class)); local 318 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); local [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
TextRange.java | 48 * Gets the suggestion spans that are put squarely on the word, with the exact start 50 * @return the list of spans. 59 // spans were cut at the cursor position, and #getSpans(start, end) does not return 60 // spans that end at `start' or begin at `end'. Consider the following case: 68 // the 4~7 spans and we can merge them accordingly. 74 final SuggestionSpan[] spans = text.getSpans(mWordAtCursorStartIndex - 1, local 78 for (; readIndex < spans.length; ++readIndex) { 79 final SuggestionSpan span = spans[readIndex]; 87 for (int i = readIndex + 1; i < spans.length; ++i) { 88 if (span.equals(spans[i])) [all...] |
SpannableStringUtils.java | 28 * Copies the spans from the region <code>start...end</code> in 31 * Spans in <code>source</code> that begin before <code>start</code> 39 * @throws IndexOutOfBoundsException if any of the copied spans 44 Object[] spans = source.getSpans(start, end, SuggestionSpan.class); local 46 for (int i = 0; i < spans.length; i++) { 47 int fl = source.getSpanFlags(spans[i]); 50 int st = source.getSpanStart(spans[i]); 51 int en = source.getSpanEnd(spans[i]); 58 dest.setSpan(spans[i], st - start + destoff, en - start + destoff, 65 * SuggestionSpans that don't have the PARAGRAPH flag, but not other spans [all...] |
/packages/apps/Email/tests/src/com/android/emailcommon/utility/ |
TextUtilitiesTests.java | 202 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); local 203 assertEquals(1, spans.length); 204 BackgroundColorSpan span = spans[0]; 213 spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); 214 assertEquals(2, spans.length); 215 span = spans[0]; 218 span = spans[1]; 229 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); local 230 assertEquals(2, spans.length); 231 BackgroundColorSpan span = spans[0] 245 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); local 257 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); local 270 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); local [all...] |
/frameworks/base/core/java/android/text/ |
SpanSet.java | 22 * A cached set of spans. Caches the result of {@link Spanned#getSpans(int, int, Class)} and then 27 * Note that empty spans are ignored by this class. 34 E[] spans; field in class:SpanSet 49 if (length > 0 && (spans == null || spans.length < length)) { 50 // These arrays may end up being too large because of the discarded empty spans 51 spans = (E[]) Array.newInstance(classType, length); 67 spans[numberOfSpans] = span; 77 * Returns true if there are spans intersecting the given interval. 103 * Removes all internal references to the spans to avoid memory leaks [all...] |
SpannableStringInternal.java | 38 Object[] spans = sp.getSpans(start, end, Object.class); local 40 for (int i = 0; i < spans.length; i++) { 41 int st = sp.getSpanStart(spans[i]); 42 int en = sp.getSpanEnd(spans[i]); 43 int fl = sp.getSpanFlags(spans[i]); 50 setSpan(spans[i], st - start, en - start, fl); 100 Object[] spans = mSpans; local 104 if (spans[i] == what) { 141 Object[] spans = mSpans; local 145 if (spans[i] == what) 165 Object[] spans = mSpans; local 179 Object[] spans = mSpans; local 193 Object[] spans = mSpans; local 209 Object[] spans = mSpans; local 287 Object[] spans = mSpans; local [all...] |
MeasuredText.java | 110 ReplacementSpan[] spans = spanned.getSpans(start, end, local 113 for (int i = 0; i < spans.length; i++) { 114 int startInPara = spanned.getSpanStart(spans[i]) - start; 115 int endInPara = spanned.getSpanEnd(spans[i]) - start; 184 float addStyleRun(TextPaint paint, MetricAffectingSpan[] spans, int len, 193 for (int i = 0; i < spans.length; i++) { 194 MetricAffectingSpan span = spans[i];
|
SpannableStringBuilder.java | 41 * specified text, including its spans if any. 49 * specified slice of the specified text, including its spans if any. 72 Object[] spans = sp.getSpans(start, end, Object.class); local 74 for (int i = 0; i < spans.length; i++) { 75 if (spans[i] instanceof NoCopySpan) { 79 int st = sp.getSpanStart(spans[i]) - start; 80 int en = sp.getSpanEnd(spans[i]) - start; 81 int fl = sp.getSpanFlags(spans[i]); 93 setSpan(false, spans[i], st, en, fl); 317 // Also, a removed SpanWatcher should not get notified of removed spans locate 361 Object[] spans = sp.getSpans(csStart, csEnd, Object.class); local 508 Object[] spans = spanned.getSpans(offset, offset, Object.class); local 642 Object[] spans = mSpans; local 709 Object[] spans = mSpans; local 731 Object[] spans = mSpans; local 753 Object[] spans = mSpans; local 774 Object[] spans = mSpans; local 872 Object[] spans = mSpans; local [all...] |
TextUtils.java | 500 // XXX currently this only reverses chars, not spans 798 * Debugging tool to print the spans in a CharSequence. The output will 817 printer.println(prefix + cs + ": (no spans)"); 932 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, local 935 for (int i = 0; i < spans.length; i++) { 936 int start = ((Spanned) text).getSpanStart(spans[i]); 937 int end = ((Spanned) text).getSpanEnd(spans[i]); 969 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, local 972 for (int i = 0; i < spans.length; i++) { 973 int start = ((Spanned) text).getSpanStart(spans[i]) 1006 Object[] spans = source.getSpans(start, end, kind); local 1283 MetricAffectingSpan[] spans = sp.getSpans( local [all...] |
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
SpannableStringUtilsTests.java | 50 Object[] spans = result.getSpans(0, result.length(), SuggestionSpan.class); local 51 for (int i = 0; i < spans.length; i++) { 52 final int flags = result.getSpanFlags(spans[i]); 55 assertTrue("Should be a SuggestionSpan", spans[i] instanceof SuggestionSpan);
|
/external/chromium_org/chrome/browser/autocomplete/ |
history_provider.cc | 80 ACMatchClassifications spans; local 83 spans.push_back(ACMatchClassification(0, url_style)); 84 return spans; 87 spans.push_back(ACMatchClassification(0, url_style)); 91 spans.push_back(ACMatchClassification(offset, 99 spans.push_back(ACMatchClassification(offset, url_style)); 102 return spans;
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowSpannableString.java | 16 private HashMap<Object, SpanHolder> spans = new HashMap<Object, SpanHolder>(); field in class:ShadowSpannableString 29 spans.put(what, new SpanHolder(start, end, flags) ); 34 spans.remove(what); 41 for (Object s : spans.keySet()) { 43 SpanHolder h = spans.get(s); 57 SpanHolder spanHolder = spans.get(what); 67 SpanHolder spanHolder = spans.get(what);
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
SuggestionFormatter.java | 52 private void setSpans(Spannable text, int start, int end, Object[] spans) { 53 for (Object span : spans) {
|
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitperl/VCSUtils_unittest/ |
parseSvnProperty.pl | 322 long sentence that spans 331 value => "A\nlong sentence that spans\nmultiple lines.", 342 long sentence that spans 352 value => "A\r\nlong sentence that spans\r\nmultiple lines.", 363 long sentence that spans 372 value => "A\nlong sentence that spans\nmultiple lines.", 383 long sentence that spans 393 value => "A\r\nlong sentence that spans\r\nmultiple lines.", 444 long sentence that spans 453 value => "A\nlong sentence that spans\nmultiple lines." [all...] |
parseSvnPropertyValue.pl | 114 long sentence that spans 119 expectedReturn => ["A\nlong sentence that spans\nmultiple lines.", "\n"], 127 long sentence that spans 133 expectedReturn => ["A\r\nlong sentence that spans\r\nmultiple lines.", "\r\n"], 141 long sentence that spans 145 expectedReturn => ["A\nlong sentence that spans\nmultiple lines.", " + A single-line.\n"], 153 long sentence that spans 157 expectedReturn => ["A\nlong sentence that spans\nmultiple lines.", "Added: svn:executable\n"], 165 long sentence that spans 168 long sentence that spans [all...] |
/frameworks/base/core/jni/ |
android_util_StringBlock.cpp | 107 const ResStringPool_span* spans = osb->styleAt(idx); local 108 if (spans == NULL) { 112 const ResStringPool_span* pos = spans; 130 while (spans->name.index != ResStringPool_span::END) { 133 (jint*)spans); 134 spans++;
|
/frameworks/base/tools/aapt/ |
StringPool.h | 75 entry_style(const entry_style& o) : offset(o.offset), spans(o.spans) { } 78 Vector<entry_style_span> spans; member in struct:StringPool::entry_style 98 ssize_t add(const String16& value, const Vector<entry_style_span>& spans, 103 status_t addStyleSpans(size_t idx, const Vector<entry_style_span>& spans);
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/ |
DescriptorsUtils.java | 377 ArrayList<String> spans = scanJavadoc(javadoc); 382 for (int n = spans.size(), i = 0; i < n; ++i) { 383 String s = spans.get(i); 385 s = spans.get(++i); 390 String base = spans.get(++i); 391 String anchor = spans.get(++i); 392 String text = spans.get(++i); 421 s = spans.get(++i); 454 ArrayList<String> spans = scanJavadoc(javadoc); 472 for (int n = spans.size(), i = 0; i < n; ++i) [all...] |
/external/chromium/chrome/browser/autocomplete/ |
history_quick_provider.cc | 219 ACMatchClassifications spans; local 222 spans.push_back(ACMatchClassification(0, ACMatchClassification::DIM)); 223 return spans; 226 spans.push_back(ACMatchClassification(0, ACMatchClassification::NONE)); 230 spans.push_back(ACMatchClassification(offset, 238 spans.push_back(ACMatchClassification(offset, 243 return spans;
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
EllipsizedMultilineTextView.java | 86 // assemble just the text portion, without spans 95 // Now copy the original spans into the assembled string, modified for any ellipsizing. 98 // spans in the assembled version if a CharacterStyle spanned across the lastLineStart 102 final Object[] spans = s.getSpans(0, s.length(), Object.class); local 104 for (int i = 0; i < spans.length; i++) { 105 final Object span = spans[i];
|
/cts/tests/tests/text/src/android/text/cts/ |
HtmlTest.java | 56 Object[] spans = spanned.getSpans(start, end, Object.class); local 57 assertEquals(expectLen, spans.length); 58 assertEquals(expectStart, spanned.getSpanStart(spans[0])); 59 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); 76 Object[] spans = spanned.getSpans(start, end, Object.class); local 77 assertEquals(spansLen, spans.length);
|
TextUtilsTest.java | 158 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); local 159 assertEquals(2, spans.length); 160 assertTrue(spans[0] instanceof URLSpan); 161 assertEquals(url, ((URLSpan) spans[0]).getURL()); 162 assertTrue(spans[1] instanceof BackgroundColorSpan); 163 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); 184 Object[] spans; local 198 spans = dest1.getSpans(0, dest1.length(), Object.class); 199 assertEquals(2, spans.length); 200 assertTrue(spans[0] instanceof URLSpan) 1853 Object[] spans = ret.getSpans(0, ret.length(), Object.class); local 1879 Object[] spans = ret.getSpans(0, ret.length(), Object.class); local [all...] |