HomeSort by relevance Sort by last modified time
    Searched defs:spannable (Results 1 - 16 of 16) sorted by null

  /cts/tests/tests/text/src/android/text/cts/
Spannable_FactoryTest.java 24 import android.text.Spannable;
25 import android.text.Spannable.Factory;
40 Factory factory = Spannable.Factory.getInstance();
42 Spannable spannable = factory.newSpannable(text); local
43 assertNotNull(spannable);
44 assertTrue(spannable instanceof SpannableString);
45 assertEquals(text, spannable.toString());
50 Factory factory = Spannable.Factory.getInstance();
56 Spannable.Factory factory = Spannable.Factory.getInstance()
    [all...]
SelectionTest.java 27 import android.text.Spannable;
979 Spannable spannable = new SpannableStringBuilder("abcdef"); local
    [all...]
SpannableStringTest.java 62 SpannableString spannable = SpannableString.valueOf(text); local
63 assertNotNull(spannable);
64 assertEquals(text, spannable.toString());
66 spannable = new SpannableString(text);
67 assertSame(spannable, SpannableString.valueOf(spannable));
79 SpannableString spannable = new SpannableString(text); local
81 spannable.setSpan(null, 1, 4, SpannableString.SPAN_POINT_POINT);
82 assertEquals(1, spannable.getSpanStart(null));
83 assertEquals(4, spannable.getSpanEnd(null))
109 SpannableString spannable = new SpannableString("hello, world"); local
134 SpannableString spannable = new SpannableString(text); local
    [all...]
SpannableStringBuilderSpanTest.java 26 import android.text.Spannable;
123 Spannable replacementSpannable = new SpannableStringBuilder(replacement);
139 private void verifySpanPositions(Spannable spannable, int replaceStart, int replaceEnd,
150 int start = spannable.getSpanStart(span);
151 int end = spannable.getSpanEnd(span);
252 private void verifyReplacementSpanPositions(Spannable originalSpannable, int replaceStart,
253 Spannable replacementSpannable, int replStart, int replEnd, int flag) {
371 void initSpans(Spannable spannable, int rangeStart, int rangeEnd, int flag)
518 SpannableStringBuilder spannable = new SpannableStringBuilder("1 selection_to_replace"); local
531 SpannableStringBuilder spannable = new SpannableStringBuilder("1\\nselection_to_replace"); local
546 SpannableStringBuilder spannable = new SpannableStringBuilder("selection_to_replace"); local
562 SpannableStringBuilder spannable = new SpannableStringBuilder("selection_to_replace\\n"); local
578 SpannableStringBuilder spannable = new SpannableStringBuilder("r remaining\\n"); local
    [all...]
SpannableStringBuilderTest.java 98 SpannableStringBuilder builder = new SpannableStringBuilder("spannable string");
112 SpannableStringBuilder builder = new SpannableStringBuilder("spannable string");
851 final SpannableStringBuilder spannable = new SpannableStringBuilder(text); local
852 Selection.setSelection(spannable, text.length());
854 spannable.replace(0, text.length(), copiedText);
856 assertEquals(copiedText.length(), spannable.length());
    [all...]
  /external/setupdesign/main/src/com/google/android/setupdesign/span/
SpanHelper.java 19 import android.text.Spannable;
28 * oldSpan} from the {@code spannable}.
30 public static void replaceSpan(Spannable spannable, Object oldSpan, Object... newSpans) {
31 final int spanStart = spannable.getSpanStart(oldSpan);
32 final int spanEnd = spannable.getSpanEnd(oldSpan);
33 spannable.removeSpan(oldSpan);
35 spannable.setSpan(newSpan, spanStart, spanEnd, 0);
  /cts/tests/tests/text/src/android/text/method/cts/
EditorState.java 22 import android.text.Spannable;
157 final Spannable spannable = new SpannableString(sb.toString()); local
172 spannable.setSpan(new MockReplacementSpan(), replacementSpanStart, replacementSpanEnd,
173 Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
175 mText = Editable.Factory.getInstance().newEditable(spannable);
TouchTest.java 131 final SpannableString spannable = new SpannableString(finalText); local
151 () -> mReturnFromTouchEvent = Touch.onTouchEvent(mTextView, spannable, event1));
157 assertEquals(0, Touch.getInitialScrollX(mTextView, spannable));
158 assertEquals(0, Touch.getInitialScrollY(mTextView, spannable));
162 () -> mReturnFromTouchEvent = Touch.onTouchEvent(mTextView, spannable, event2));
168 assertEquals(0, Touch.getInitialScrollX(mTextView, spannable));
169 assertEquals(0, Touch.getInitialScrollY(mTextView, spannable));
173 () -> mReturnFromTouchEvent = Touch.onTouchEvent(mTextView, spannable, event3));
179 assertEquals(-1, Touch.getInitialScrollX(mTextView, spannable));
180 assertEquals(-1, Touch.getInitialScrollY(mTextView, spannable));
    [all...]
LinkMovementMethodTest.java 34 import android.text.Spannable;
74 private Spannable mSpannable;
89 mView.setText(CONTENT, BufferType.SPANNABLE);
94 mSpannable = (Spannable) mView.getText();
119 Spannable spannable = new SpannableString("test sequence"); local
120 Selection.setSelection(spannable, 0, spannable.length());
122 assertSelection(spannable, 0, spannable.length())
462 Spannable spannable = new SpannableString("test sequence"); local
    [all...]
ScrollingMovementMethodTest.java 30 import android.text.Spannable;
75 private Spannable mSpannable;
89 mSpannable = (Spannable) mTextView.getText();
111 mTextView.setText("hello world", BufferType.SPANNABLE);
113 mSpannable = (Spannable) mTextView.getText();
395 runActionOnUiThread(() -> method.onKeyDown(mTextView, (Spannable) mTextView.getText(),
401 runActionOnUiThread(() -> method.onKeyDown(mTextView, (Spannable) mTextView.getText(),
589 final SpannableString spannable = new SpannableString("Test Content"); local
594 assertFalse(method.onKeyUp(view, spannable, KeyEvent.KEYCODE_0, event));
596 assertFalse(method.onKeyUp(null, spannable, KeyEvent.KEYCODE_0, event))
    [all...]
ArrowKeyMovementMethodTest.java 31 import android.text.Spannable;
188 // Should throw NullPointerException when param spannable is null
963 Spannable spannable = new SpannableString("test content"); local
1008 SpannableString spannable = new SpannableString("Test Content"); local
    [all...]
  /frameworks/base/apct-tests/perftests/core/src/android/text/
NonEditableTextGenerator.java 67 private Spannable createSpannable(CharSequence charSequence) {
68 final Spannable spannable = (mTextType == TextType.SPANNABLE_BUILDER) ? local
73 spannable.setSpan(new BulletSpan(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE);
76 spannable.setSpan(new Object(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE);
77 spannable.setSpan(new Object(), 0, 1, SPAN_INCLUSIVE_INCLUSIVE);
79 return spannable;
  /external/setupdesign/main/src/com/google/android/setupdesign/view/
RichTextView.java 43 * SpanHelper#replaceSpan(android.text.Spannable, Object, Object)}
67 final SpannableString spannable = new SpannableString(text); local
68 final Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class);
81 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan);
85 SpanHelper.replaceSpan(spannable, span, link, typefaceSpan);
88 return spannable;
  /cts/tests/tests/telephony/current/src/android/telephony/cts/
PhoneNumberUtilsTest.java 36 import android.text.Spannable;
335 Spannable spannable = new SpannableString("Hello 6502223333"); local
337 PhoneNumberUtils.addTtsSpan(spannable, 5, spannable.length());
338 // Verify: the Spannable is annotated with a TtsSpan in the correct location.
339 TtsSpan[] ttsSpans = spannable.getSpans(5, spannable.length() - 1, TtsSpan.class);
350 Spannable spannable = (Spannable) PhoneNumberUtils.createTtsSpannable(phoneNumber) local
    [all...]
  /cts/tests/tests/text/src/android/text/util/cts/
LinkifyTest.java 27 import android.text.Spannable;
107 SpannableString spannable = new SpannableString("name@gmail.com, " local
114 assertTrue(Linkify.addLinks(spannable, Linkify.WEB_URLS));
115 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class);
122 assertTrue(Linkify.addLinks(spannable, Linkify.EMAIL_ADDRESSES));
123 spans = spannable.getSpans(0, spannable.length(), URLSpan.class);
127 assertFalse(Linkify.addLinks((Spannable) null, 0));
132 Linkify.addLinks((Spannable) null, Linkify.WEB_URLS)
147 SpannableString spannable = SpannableString.valueOf(text); local
265 SpannableString spannable = new SpannableString(text); local
290 SpannableString spannable = new SpannableString(text); local
299 SpannableString spannable = new SpannableString(text); local
342 SpannableString spannable = new SpannableString(text); local
356 SpannableString spannable = new SpannableString( local
468 final Spannable spannable = new SpannableString(text); local
488 final SpannableString spannable = new SpannableString(text); local
509 Spannable spannable = new SpannableString("hey man.its me"); local
1027 Spannable spannable = new SpannableString(str); local
1040 Spannable spannable = new SpannableString("start " + string + " end"); local
1047 Spannable spannable = new SpannableString("start " + string + " end"); local
    [all...]
  /cts/tests/tests/widget/src/android/widget/cts/
TextViewTest.java 82 import android.text.Spannable;
544 Spannable spanString = (Spannable) mTextView.getText();
560 spanString = (Spannable) mTextView.getText();
684 mActivityRule.runOnUiThread(() -> Selection.removeSelection((Spannable) textView.getText()));
739 mTextView.setText(blank, BufferType.SPANNABLE);
749 mTextView.setText(content, BufferType.SPANNABLE);
760 Selection.setSelection((Spannable) mTextView.getText(), 0);
771 mTextView.setText(blank, BufferType.SPANNABLE);
2406 final Spannable spannable = (Spannable)textView.getText(); local
2420 final Spannable spannable = (Spannable) mTextView.getText(); local
4671 SpannableString spannable = new SpannableString(string); local
    [all...]

Completed in 661 milliseconds