Home
last modified time | relevance | path

Searched refs:spannable (Results 1 – 12 of 12) sorted by relevance

/cts/tests/tests/text/src/android/text/cts/
DSpannableStringTest.java43 SpannableString spannable = SpannableString.valueOf(text); in testValueOf() local
44 assertNotNull(spannable); in testValueOf()
45 assertEquals(text, spannable.toString()); in testValueOf()
47 spannable = new SpannableString(text); in testValueOf()
48 assertSame(spannable, SpannableString.valueOf(spannable)); in testValueOf()
59 SpannableString spannable = new SpannableString(text); in testSetSpan() local
61 spannable.setSpan(null, 1, 4, SpannableString.SPAN_POINT_POINT); in testSetSpan()
62 assertEquals(1, spannable.getSpanStart(null)); in testSetSpan()
63 assertEquals(4, spannable.getSpanEnd(null)); in testSetSpan()
64 assertEquals(SpannableString.SPAN_POINT_POINT, spannable.getSpanFlags(null)); in testSetSpan()
[all …]
DSpannableStringBuilderSpanTest.java125 private void checkSpanPositions(Spannable spannable, int replaceStart, int replaceEnd, in checkSpanPositions() argument
136 int start = spannable.getSpanStart(span); in checkSpanPositions()
137 int end = spannable.getSpanEnd(span); in checkSpanPositions()
357 void initSpans(Spannable spannable, int rangeStart, int rangeEnd, int flag) { in initSpans() argument
365 mPositionSet.addPosition((rangeEnd + spannable.length()) / 2); in initSpans()
366 mPositionSet.addPosition(spannable.length()); in initSpans()
374 spannable.setSpan(mSpans[count], start, end, flag); in initSpans()
383 spannable.setSpan(mRecorder, 0, spannable.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); in initSpans()
384 mRecorder.reset(spannable); in initSpans()
423 public void reset(Spannable spannable) { in reset() argument
[all …]
DSpannable_FactoryTest.java30 Spannable spannable = factory.newSpannable(text); in testNewSpannable() local
31 assertNotNull(spannable); in testNewSpannable()
32 assertTrue(spannable instanceof SpannableString); in testNewSpannable()
33 assertEquals(text, spannable.toString()); in testNewSpannable()
/cts/tests/tests/text/src/android/text/method/cts/
DLinkMovementMethodTest.java101 Spannable spannable = new SpannableString("test sequence"); in testOnTakeFocus() local
102 Selection.setSelection(spannable, 0, spannable.length()); in testOnTakeFocus()
104 assertSelection(spannable, 0, spannable.length()); in testOnTakeFocus()
105 …assertTrue("Expected at least 2 spans", 2 <= spannable.getSpans(0, spannable.length(), Object.clas… in testOnTakeFocus()
106 method.onTakeFocus(null, spannable, View.FOCUS_UP); in testOnTakeFocus()
107 assertSelection(spannable, -1); in testOnTakeFocus()
108 assertEquals(1, spannable.getSpans(0, spannable.length(), Object.class).length); in testOnTakeFocus()
109 Object span = spannable.getSpans(0, spannable.length(), Object.class)[0]; in testOnTakeFocus()
110 assertEquals(0, spannable.getSpanStart(span)); in testOnTakeFocus()
111 assertEquals(0, spannable.getSpanEnd(span)); in testOnTakeFocus()
[all …]
DTouchTest.java128 final SpannableString spannable = new SpannableString(finalText); in testOnTouchEvent() local
151 mReturnFromTouchEvent = Touch.onTouchEvent(tv, spannable, event1); in testOnTouchEvent()
159 assertEquals(0, Touch.getInitialScrollX(tv, spannable)); in testOnTouchEvent()
160 assertEquals(0, Touch.getInitialScrollY(tv, spannable)); in testOnTouchEvent()
165 mReturnFromTouchEvent = Touch.onTouchEvent(tv, spannable, event2); in testOnTouchEvent()
173 assertEquals(0, Touch.getInitialScrollX(tv, spannable)); in testOnTouchEvent()
174 assertEquals(0, Touch.getInitialScrollY(tv, spannable)); in testOnTouchEvent()
179 mReturnFromTouchEvent = Touch.onTouchEvent(tv, spannable, event3); in testOnTouchEvent()
187 assertEquals(-1, Touch.getInitialScrollX(tv, spannable)); in testOnTouchEvent()
188 assertEquals(-1, Touch.getInitialScrollY(tv, spannable)); in testOnTouchEvent()
DEditorState.java157 final Spannable spannable = new SpannableString(sb.toString()); in setByString() local
172 spannable.setSpan(new MockReplacementSpan(), replacementSpanStart, replacementSpanEnd, in setByString()
175 mText = Editable.Factory.getInstance().newEditable(spannable); in setByString()
DArrowKeyMovementMethodTest.java943 Spannable spannable = new SpannableString("test content"); in testInitialize() local
946 assertEquals(-1, Selection.getSelectionStart(spannable)); in testInitialize()
947 assertEquals(-1, Selection.getSelectionEnd(spannable)); in testInitialize()
948 method.initialize(null, spannable); in testInitialize()
949 assertEquals(0, Selection.getSelectionStart(spannable)); in testInitialize()
950 assertEquals(0, Selection.getSelectionEnd(spannable)); in testInitialize()
952 Selection.setSelection(spannable, 2); in testInitialize()
953 assertEquals(2, Selection.getSelectionStart(spannable)); in testInitialize()
954 assertEquals(2, Selection.getSelectionEnd(spannable)); in testInitialize()
955 method.initialize(null, spannable); in testInitialize()
[all …]
DScrollingMovementMethodTest.java652 SpannableString spannable = new SpannableString("Test Content");
657 assertFalse(method.onKeyUp(view, spannable, KeyEvent.KEYCODE_0, event));
659 assertFalse(method.onKeyUp(null, spannable, KeyEvent.KEYCODE_0, event));
661 assertFalse(method.onKeyUp(view, spannable, 0, event));
662 assertFalse(method.onKeyUp(view, spannable, KeyEvent.KEYCODE_0, null));
/cts/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java84 SpannableString spannable = new SpannableString("name@gmail.com, " in testAddLinks1() local
91 assertTrue(Linkify.addLinks(spannable, Linkify.WEB_URLS)); in testAddLinks1()
92 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
99 assertTrue(Linkify.addLinks(spannable, Linkify.EMAIL_ADDRESSES)); in testAddLinks1()
100 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
124 SpannableString spannable = SpannableString.valueOf(text); in testAddLinks2() local
125 tv.setText(spannable); in testAddLinks2()
238 SpannableString spannable = new SpannableString(text); in testAddLinks5() local
239 Linkify.addLinks(spannable, LINKIFY_TEST_PATTERN, "Test:"); in testAddLinks5()
240 URLSpan[] spans = (spannable.getSpans(0, spannable.length(), URLSpan.class)); in testAddLinks5()
[all …]
/cts/tests/tests/telephony/src/android/telephony/cts/
DPhoneNumberUtilsTest.java346 Spannable spannable = new SpannableString("Hello 6502223333"); in testAddPhoneTtsSpan() local
348 PhoneNumberUtils.addTtsSpan(spannable, 5, spannable.length()); in testAddPhoneTtsSpan()
350 TtsSpan[] ttsSpans = spannable.getSpans(5, spannable.length() - 1, TtsSpan.class); in testAddPhoneTtsSpan()
360 Spannable spannable = (Spannable) PhoneNumberUtils.createTtsSpannable(phoneNumber); in testGetPhoneTtsSpannable() local
362 TtsSpan[] ttsSpans = spannable.getSpans(0, spannable.length() - 1, TtsSpan.class); in testGetPhoneTtsSpannable()
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewTest.java1973 final Spannable spannable = (Spannable)textView.getText(); in hasSpansAtMiddleOfText() local
1974 final int at = spannable.length() / 2; in hasSpansAtMiddleOfText()
1975 return spannable.getSpans(at, at, type).length > 0; in hasSpansAtMiddleOfText()
1986 final Spannable spannable = (Spannable) mTextView.getText(); in testCutAndPaste_withAndWithoutStyle()
1987 spannable.setSpan(new URLSpan("http://example.com"), 0, spannable.length(), 0); in testCutAndPaste_withAndWithoutStyle()
3443 SpannableString spannable = new SpannableString(string); in testGetUrls() local
3444 spannable.setSpan(new URLSpan(url), 0, url.length(), 0); in testGetUrls()
3445 mTextView.setText(spannable, BufferType.SPANNABLE); in testGetUrls()
3450 spannable.setSpan(new URLSpan(email), 0, email.length(), 0); in testGetUrls()
3451 mTextView.setText(spannable, BufferType.SPANNABLE); in testGetUrls()
[all …]
/cts/tools/dex-tools/dex/
Dclasses.out.dex112712 public static final int spannable