Home
last modified time | relevance | path

Searched refs:text (Results 1 – 25 of 268) sorted by relevance

1234567891011

/cts/tests/tests/text/src/android/text/util/cts/
DRfc822TokenizerTest.java17 package android.text.util.cts;
21 import android.text.util.Rfc822Token;
22 import android.text.util.Rfc822Tokenizer;
39 String text = ", " + token1 + "\",\"" + token2 + ";" + token3 + " <;>" + token4; in testFindTokenStart() local
40 final int TOKEN_START_POS_1 = text.indexOf(token1); in testFindTokenStart()
41 final int TOKEN_START_POS_2 = text.indexOf(token2); in testFindTokenStart()
42 final int TOKEN_START_POS_3 = text.indexOf(token3); in testFindTokenStart()
43 final int TOKEN_START_POS_4 = text.indexOf(token4); in testFindTokenStart()
44 assertEquals(0, rfc822Tokenizer.findTokenStart(text, 0)); in testFindTokenStart()
45 assertEquals(0, rfc822Tokenizer.findTokenStart(text, TOKEN_START_POS_1)); in testFindTokenStart()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DMultiAutoCompleteTextViewTest.java28 import android.text.SpannableString;
29 import android.text.Spanned;
30 import android.text.TextUtils;
169 String text = "Android test."; in testPerformFiltering() local
170 multiAutoCompleteTextView.setText(text); in testPerformFiltering()
173 multiAutoCompleteTextView.performFiltering(text, KeyEvent.KEYCODE_0); in testPerformFiltering()
176 multiAutoCompleteTextView.performFiltering(text, 0, text.length(), KeyEvent.KEYCODE_E); in testPerformFiltering()
187 String text = "CTS."; in testReplaceText() local
188 multiAutoCompleteTextView.setText(text); in testReplaceText()
189 assertEquals(text, multiAutoCompleteTextView.getText().toString()); in testReplaceText()
[all …]
DMultiAutoCompleteTextView_CommaTokenizerTest.java20 import android.text.SpannableString;
21 import android.text.Spanned;
22 import android.text.style.UnderlineSpan;
105 String text = "end with comma,"; in testTerminateToken() local
106 assertEquals(text, mCommaTokenizer.terminateToken(text)); in testTerminateToken()
108 text = "end without comma"; in testTerminateToken()
110 assertEquals(text + ", ", mCommaTokenizer.terminateToken(text)); in testTerminateToken()
112 text = "end without comma!"; in testTerminateToken()
114 assertEquals(text + ", ", mCommaTokenizer.terminateToken(text)); in testTerminateToken()
116 text = "has ending spaces "; in testTerminateToken()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DMetaKeyKeyListenerTest.java17 package android.text.method.cts;
19 import android.text.Editable;
20 import android.text.Selection;
21 import android.text.Spannable;
22 import android.text.Spanned;
23 import android.text.method.cts.KeyListenerTestCase;
24 import android.text.method.DateKeyListener;
25 import android.text.method.MetaKeyKeyListener;
130 Spannable text = Editable.Factory.getInstance().newEditable(str); in testResetMetaState() local
131 text.setSpan(Selection.SELECTION_START, 0, 0, Spanned.SPAN_POINT_POINT); in testResetMetaState()
[all …]
DCharacterPickerDialogTest.java17 package android.text.method.cts;
23 import android.text.Editable;
24 import android.text.Selection;
25 import android.text.method.CharacterPickerDialog;
66 Editable text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick() local
69 new CharacterPickerDialog(view.getContext(), view, text, "abc", false); in testOnItemClick()
73 Selection.setSelection(text, 0, 0); in testOnItemClick()
74 assertEquals(str, text.toString()); in testOnItemClick()
78 assertEquals("a123456", text.toString()); in testOnItemClick()
83 Selection.setSelection(text, 2, 2); in testOnItemClick()
[all …]
DKeyListenerCtsActivity.java17 package android.text.method.cts;
19 import android.text.cts.R;
24 import android.text.method.BaseKeyListener;
25 import android.text.method.DateKeyListener;
26 import android.text.method.DateTimeKeyListener;
27 import android.text.method.DigitsKeyListener;
28 import android.text.method.MultiTapKeyListener;
29 import android.text.method.NumberKeyListener;
30 import android.text.method.QwertyKeyListener;
31 import android.text.method.TextKeyListener;
[all …]
DTextKeyListenerTest.java17 package android.text.method.cts;
22 import android.text.Editable;
23 import android.text.InputType;
24 import android.text.Selection;
25 import android.text.Spannable;
26 import android.text.SpannableStringBuilder;
27 import android.text.method.TextKeyListener;
28 import android.text.method.TextKeyListener.Capitalize;
88 final Spannable text = new SpannableStringBuilder("123456"); in testOnSpanAdded() local
94 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded()
[all …]
DCtsActivity.java17 package android.text.method.cts;
20 import android.text.method.ArrowKeyMovementMethod;
21 import android.text.method.LinkMovementMethod;
22 import android.text.method.ScrollingMovementMethod;
/cts/tests/tests/text/src/android/text/cts/
DSpannedStringTest.java17 package android.text.cts;
20 import android.text.SpannedString;
34 String text = "test valueOf"; in testValueOf() local
35 SpannedString spanned = SpannedString.valueOf(text); in testValueOf()
36 assertEquals(text, spanned.toString()); in testValueOf()
38 spanned = new SpannedString(text); in testValueOf()
49 String text = "hello, world"; in testSubSequence() local
50 SpannedString spanned = new SpannedString(text); in testSubSequence()
56 subSequence = spanned.subSequence(0, text.length()); in testSubSequence()
58 assertEquals(text, subSequence.toString()); in testSubSequence()
[all …]
DSelectionTest.java17 package android.text.cts;
21 import android.text.Selection;
22 import android.text.SpannableStringBuilder;
23 import android.text.StaticLayout;
24 import android.text.TextPaint;
28 CharSequence text = "hello, world"; in testGetSelectionStart() local
29 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionStart()
45 CharSequence text = "hello, world"; in testGetSelectionEnd() local
46 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionEnd()
62 CharSequence text = "hello, world"; in testSetSelection1() local
[all …]
DSpannableStringBuilderTest.java17 package android.text.cts;
22 import android.text.Editable;
23 import android.text.InputFilter;
24 import android.text.SpannableString;
25 import android.text.SpannableStringBuilder;
26 import android.text.Spanned;
27 import android.text.TextWatcher;
28 import android.text.style.BulletSpan;
29 import android.text.style.ParagraphStyle;
30 import android.text.style.QuoteSpan;
[all …]
DStaticLayoutLineBreakingTest.java17 package android.text.cts;
20 import android.text.SpannableStringBuilder;
21 import android.text.Spanned;
22 import android.text.StaticLayout;
23 import android.text.TextDirectionHeuristics;
24 import android.text.TextPaint;
25 import android.text.Layout.Alignment;
26 import android.text.style.MetricAffectingSpan;
207 private static CharSequence spanify(String text) { in spanify() argument
208 int startIndex = text.indexOf('<'); in spanify()
[all …]
DSpannable_FactoryTest.java17 package android.text.cts;
20 import android.text.Spannable;
21 import android.text.SpannableString;
22 import android.text.Spannable.Factory;
27 final String text = "test newSpannable"; in testNewSpannable() local
30 Spannable spannable = factory.newSpannable(text); in testNewSpannable()
33 assertEquals(text, spannable.toString()); in testNewSpannable()
DSpannableStringTest.java17 package android.text.cts;
21 import android.text.SpannableString;
22 import android.text.Spanned;
23 import android.text.style.LocaleSpan;
24 import android.text.style.QuoteSpan;
25 import android.text.style.UnderlineSpan;
42 String text = "test valueOf"; in testValueOf() local
43 SpannableString spannable = SpannableString.valueOf(text); in testValueOf()
45 assertEquals(text, spannable.toString()); in testValueOf()
47 spannable = new SpannableString(text); in testValueOf()
[all …]
DTextUtilsTest.java17 package android.text.cts;
32 import android.text.GetChars;
33 import android.text.SpannableString;
34 import android.text.SpannableStringBuilder;
35 import android.text.Spanned;
36 import android.text.SpannedString;
37 import android.text.TextPaint;
38 import android.text.TextUtils;
39 import android.text.TextUtils.TruncateAt;
40 import android.text.style.BackgroundColorSpan;
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityTextActionTest.java19 import android.text.TextUtils;
49 final TextView textView = (TextView) getActivity().findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
59 final AccessibilityNodeInfo text = mUiAutomation.getRootInActiveWindow() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local
62 assertFalse("Standard text view should not support SET_TEXT", text.getActionList() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
65 text.getActions() & AccessibilityNodeInfo.ACTION_SET_TEXT); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
69 assertFalse(text.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, args)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
77 final TextView textView = (TextView) getActivity().findViewById(R.id.text); in testEditableTextView_shouldExposeAndRespondToSetTextAction()
87 final AccessibilityNodeInfo text = mUiAutomation.getRootInActiveWindow() in testEditableTextView_shouldExposeAndRespondToSetTextAction() local
90 assertTrue("Editable text view should support SET_TEXT", text.getActionList() in testEditableTextView_shouldExposeAndRespondToSetTextAction()
94 text.getActions() & AccessibilityNodeInfo.ACTION_SET_TEXT); in testEditableTextView_shouldExposeAndRespondToSetTextAction()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DIconMarginSpanTest.java17 package android.text.style.cts;
24 import android.text.Html;
25 import android.text.Layout;
26 import android.text.Spanned;
27 import android.text.StaticLayout;
28 import android.text.TextPaint;
29 import android.text.style.IconMarginSpan;
57 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local
61 iconMarginSpan.drawLeadingMargin(c, p, 0, 0, 0, 0, 0, text, 0, 0, true, layout); in testDrawLeadingMargin()
81 Spanned text = Html.fromHtml("cts test."); in testChooseHeight() local
[all …]
DDrawableMarginSpanTest.java17 package android.text.style.cts;
19 import android.text.cts.R;
26 import android.text.Html;
27 import android.text.Layout;
28 import android.text.Spanned;
29 import android.text.StaticLayout;
30 import android.text.TextPaint;
31 import android.text.style.DrawableMarginSpan;
64 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local
71 0, 0, text, 0, 0, true, layout); in testDrawLeadingMargin()
[all …]
DMetricAffectingSpanTest.java17 package android.text.style.cts;
20 import android.text.TextPaint;
21 import android.text.style.CharacterStyle;
22 import android.text.style.MetricAffectingSpan;
23 import android.text.style.SuperscriptSpan;
DBulletSpanTest.java17 package android.text.style.cts;
24 import android.text.Html;
25 import android.text.Spanned;
26 import android.text.style.BulletSpan;
61 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local
63 bulletSpan.drawLeadingMargin(canvas, paint, 10, 0, 10, 0, 20, text, 0, 0, true, null); in testDrawLeadingMargin()
71 String text = "cts test."; in testDrawLeadingMarginFailure() local
72 bulletSpan.drawLeadingMargin(null, null, 0, 0, 0, 0, 0, text, 0, 0, true, null); in testDrawLeadingMarginFailure()
DReplacementSpanTest.java17 package android.text.style.cts;
23 import android.text.TextPaint;
24 import android.text.style.ReplacementSpan;
42 public void draw(Canvas canvas, CharSequence text, int start, int end, in draw() argument
48 public int getSize(Paint paint, CharSequence text, int start, int end, in getSize() argument
/cts/tests/tests/text/src/android/text/format/cts/
DDateUtilsTest.java17 package android.text.format.cts;
21 import android.text.format.DateUtils;
157 fixedTime + DAY_DURATION, fixedTime, java.text.DateFormat.FULL, in testFormatSameDayTime()
158 java.text.DateFormat.FULL)); in testFormatSameDayTime()
160 fixedTime, java.text.DateFormat.DEFAULT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
162 fixedTime, java.text.DateFormat.LONG, java.text.DateFormat.FULL)); in testFormatSameDayTime()
164 fixedTime, java.text.DateFormat.MEDIUM, java.text.DateFormat.FULL)); in testFormatSameDayTime()
166 fixedTime, java.text.DateFormat.SHORT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
170 fixedTime, java.text.DateFormat.FULL, java.text.DateFormat.FULL)); in testFormatSameDayTime()
172 fixedTime, java.text.DateFormat.FULL, java.text.DateFormat.DEFAULT)); in testFormatSameDayTime()
[all …]
/cts/libs/vogar-expect/src/vogar/util/
DMarkResetConsole.java34 public void println(String text) { in println() argument
35 print(text + "\n"); in println()
38 public void print(String text) { in print() argument
39 for (int i = 0; i < text.length(); i++) { in print()
40 if (text.charAt(i) == '\n') { in print()
44 rowContent.append(text.charAt(i)); in print()
48 out.print(text); in print()
/cts/tests/tests/widget/src/android/widget/cts/util/
DListItemFactory.java154 public static View button(int position, Context context, String text, int desiredHeight) { in button() argument
157 result.setText(text); in button()
175 public static View convertButton(View convertView, String text, int position) { in convertButton() argument
177 ((Button) convertView).setText(text); in convertButton()
194 public static View text(int position, Context context, String text, int desiredHeight) { in text() method in ListItemFactory
197 result.setText(text); in text()
215 public static View convertText(View convertView, String text, int position) { in convertText() argument
217 ((TextView) convertView).setText(text); in convertText()
235 public static View doubleText(int position, Context context, String text, int desiredHeight) { in doubleText() argument
248 t1.setText(text); in doubleText()
[all …]
/cts/tests/tests/view/src/android/view/inputmethod/cts/
DBaseInputConnectionTest.java24 import android.text.Editable;
25 import android.text.Selection;
26 import android.text.Spannable;
27 import android.text.SpannableString;
28 import android.text.TextUtils;
94 Spannable text = new SpannableString("Test ComposingSpans"); in testOpComposingSpans() local
95 BaseInputConnection.setComposingSpans(text); in testOpComposingSpans()
96 assertTrue(BaseInputConnection.getComposingSpanStart(text) > -1); in testOpComposingSpans()
97 assertTrue(BaseInputConnection.getComposingSpanEnd(text) > -1); in testOpComposingSpans()
98 BaseInputConnection.removeComposingSpans(text); in testOpComposingSpans()
[all …]

1234567891011