/cts/tests/tests/text/src/android/text/style/cts/ |
D | UnderlineSpanTest.java | 17 package android.text.style.cts; 26 import android.text.SpannableString; 27 import android.text.Spanned; 28 import android.text.StaticLayout; 29 import android.text.TextPaint; 30 import android.text.style.UnderlineSpan; 94 private float textWidth(CharSequence text) { in textWidth() argument 99 text, 0, text.length(), tp, largeWidth).build(); in textWidth() 107 final SpannableString text = new SpannableString("P."); in testDoesntAffectWidth() local 108 final float origLineWidth = textWidth(text); in testDoesntAffectWidth() [all …]
|
D | StrikethroughSpanTest.java | 17 package android.text.style.cts; 26 import android.text.SpannableString; 27 import android.text.Spanned; 28 import android.text.StaticLayout; 29 import android.text.TextPaint; 30 import android.text.style.StrikethroughSpan; 97 private float textWidth(CharSequence text) { in textWidth() argument 102 text, 0, text.length(), tp, largeWidth).build(); in textWidth() 109 final SpannableString text = new SpannableString("P."); in testDoesntAffectWidth() local 110 final float origLineWidth = textWidth(text); in testDoesntAffectWidth() [all …]
|
D | IconMarginSpanTest.java | 17 package android.text.style.cts; 27 import android.text.Html; 28 import android.text.Layout; 29 import android.text.Spanned; 30 import android.text.StaticLayout; 31 import android.text.TextPaint; 32 import android.text.style.IconMarginSpan; 68 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local 72 iconMarginSpan.drawLeadingMargin(c, p, 0, 0, 0, 0, 0, text, 0, 0, true, layout); in testDrawLeadingMargin() 94 Spanned text = Html.fromHtml("cts test."); in testChooseHeight() local [all …]
|
D | DrawableMarginSpanTest.java | 17 package android.text.style.cts; 29 import android.text.Html; 30 import android.text.Layout; 31 import android.text.Spanned; 32 import android.text.StaticLayout; 33 import android.text.TextPaint; 34 import android.text.cts.R; 35 import android.text.style.DrawableMarginSpan; 83 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local 90 0, 0, text, 0, 0, true, layout); in testDrawLeadingMargin() [all …]
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | KeyListenerCtsActivity.java | 17 package android.text.method.cts; 21 import android.text.cts.R; 22 import android.text.method.BaseKeyListener; 23 import android.text.method.DateKeyListener; 24 import android.text.method.DateTimeKeyListener; 25 import android.text.method.DigitsKeyListener; 26 import android.text.method.MultiTapKeyListener; 27 import android.text.method.NumberKeyListener; 28 import android.text.method.QwertyKeyListener; 29 import android.text.method.TextKeyListener; [all …]
|
D | MetaKeyKeyListenerTest.java | 17 package android.text.method.cts; 30 import android.text.Editable; 31 import android.text.Selection; 32 import android.text.Spannable; 33 import android.text.Spanned; 34 import android.text.method.DateKeyListener; 35 import android.text.method.MetaKeyKeyListener; 150 Spannable text = Editable.Factory.getInstance().newEditable(str); in testResetMetaState() local 151 text.setSpan(Selection.SELECTION_START, 0, 0, Spanned.SPAN_POINT_POINT); in testResetMetaState() 152 text.setSpan(Selection.SELECTION_END, str.length(), str.length(), Spanned.SPAN_POINT_POINT); in testResetMetaState() [all …]
|
D | CharacterPickerDialogTest.java | 17 package android.text.method.cts; 28 import android.text.Editable; 29 import android.text.Selection; 30 import android.text.method.CharacterPickerDialog; 75 Editable text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick() local 78 new CharacterPickerDialog(view.getContext(), view, text, "abc", false); in testOnItemClick() 82 Selection.setSelection(text, 0, 0); in testOnItemClick() 83 assertEquals(str, text.toString()); in testOnItemClick() 87 assertEquals("a123456", text.toString()); in testOnItemClick() 92 Selection.setSelection(text, 2, 2); in testOnItemClick() [all …]
|
D | TextKeyListenerTest.java | 17 package android.text.method.cts; 37 import android.text.Editable; 38 import android.text.InputType; 39 import android.text.Selection; 40 import android.text.Spannable; 41 import android.text.SpannableStringBuilder; 42 import android.text.method.TextKeyListener; 43 import android.text.method.TextKeyListener.Capitalize; 104 final Spannable text = new SpannableStringBuilder("123456"); in testOnSpanAdded() local 109 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded() [all …]
|
D | CtsActivity.java | 17 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/util/cts/ |
D | Rfc822TokenizerTest.java | 17 package android.text.util.cts; 24 import android.text.util.Rfc822Token; 25 import android.text.util.Rfc822Tokenizer; 52 String text = ", " + token1 + "\",\"" + token2 + ";" + token3 + " <;>" + token4; in testFindTokenStart() local 53 final int TOKEN_START_POS_1 = text.indexOf(token1); in testFindTokenStart() 54 final int TOKEN_START_POS_2 = text.indexOf(token2); in testFindTokenStart() 55 final int TOKEN_START_POS_3 = text.indexOf(token3); in testFindTokenStart() 56 final int TOKEN_START_POS_4 = text.indexOf(token4); in testFindTokenStart() 57 assertEquals(0, rfc822Tokenizer.findTokenStart(text, 0)); in testFindTokenStart() 58 assertEquals(0, rfc822Tokenizer.findTokenStart(text, TOKEN_START_POS_1)); in testFindTokenStart() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | MultiAutoCompleteTextView_CommaTokenizerTest.java | 23 import android.text.SpannableString; 24 import android.text.Spanned; 25 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 …]
|
D | MultiAutoCompleteTextViewTest.java | 33 import android.text.SpannableString; 34 import android.text.Spanned; 35 import android.text.TextUtils; 179 String text = "Android test."; in testPerformFiltering() local 180 multiAutoCompleteTextView.setText(text); in testPerformFiltering() 182 multiAutoCompleteTextView.performFiltering(text, KeyEvent.KEYCODE_0); in testPerformFiltering() 186 multiAutoCompleteTextView.performFiltering(text, 0, text.length(), KeyEvent.KEYCODE_E); in testPerformFiltering() 198 String text = "CTS."; in testReplaceText() local 199 multiAutoCompleteTextView.setText(text); in testReplaceText() 200 assertEquals(text, multiAutoCompleteTextView.getText().toString()); in testReplaceText() [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | SpannedStringTest.java | 17 package android.text.cts; 26 import android.text.SpannedString; 46 String text = "test valueOf"; in testValueOf() local 47 SpannedString spanned = SpannedString.valueOf(text); in testValueOf() 48 assertEquals(text, spanned.toString()); in testValueOf() 50 spanned = new SpannedString(text); in testValueOf() 61 String text = "hello, world"; in testSubSequence() local 62 SpannedString spanned = new SpannedString(text); in testSubSequence() 68 subSequence = spanned.subSequence(0, text.length()); in testSubSequence() 70 assertEquals(text, subSequence.toString()); in testSubSequence() [all …]
|
D | SpannedTest.java | 17 package android.text.cts; 24 import android.text.Spannable; 25 import android.text.SpannableString; 26 import android.text.SpannableStringBuilder; 27 import android.text.Spanned; 28 import android.text.SpannedString; 29 import android.text.style.LocaleSpan; 30 import android.text.style.QuoteSpan; 31 import android.text.style.UnderlineSpan; 74 final SpannableString text = new SpannableString("0123 5678"); in testNextSpanTransition() local [all …]
|
D | StaticLayoutLineBreakingTest.java | 17 package android.text.cts; 26 import android.text.Layout; 27 import android.text.Layout.Alignment; 28 import android.text.SpannableStringBuilder; 29 import android.text.Spanned; 30 import android.text.StaticLayout; 31 import android.text.TextDirectionHeuristics; 32 import android.text.TextPaint; 33 import android.text.style.MetricAffectingSpan; 200 private static CharSequence spanify(String text) { in spanify() argument [all …]
|
D | SelectionTest.java | 17 package android.text.cts; 26 import android.text.Layout; 27 import android.text.Selection; 28 import android.text.SpanWatcher; 29 import android.text.Spannable; 30 import android.text.SpannableStringBuilder; 31 import android.text.StaticLayout; 32 import android.text.TextPaint; 44 CharSequence text = "hello, world"; in testGetSelectionStart() local 45 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionStart() [all …]
|
D | Spannable_FactoryTest.java | 17 package android.text.cts; 26 import android.text.Spannable; 27 import android.text.Spannable.Factory; 28 import android.text.SpannableString; 38 final String text = "test newSpannable"; in testNewSpannable() local 41 Spannable spannable = factory.newSpannable(text); in testNewSpannable() 44 assertEquals(text, spannable.toString()); in testNewSpannable()
|
D | SpannableStringTest.java | 17 package android.text.cts; 26 import android.text.Layout; 27 import android.text.SpannableString; 28 import android.text.SpannableStringBuilder; 29 import android.text.Spanned; 30 import android.text.method.SingleLineTransformationMethod; 31 import android.text.method.TransformationMethod; 32 import android.text.style.AlignmentSpan; 33 import android.text.style.LocaleSpan; 34 import android.text.style.QuoteSpan; [all …]
|
D | SpannableStringBuilderTest.java | 17 package android.text.cts; 28 import android.text.Editable; 29 import android.text.InputFilter; 30 import android.text.Selection; 31 import android.text.SpannableString; 32 import android.text.SpannableStringBuilder; 33 import android.text.Spanned; 34 import android.text.TextWatcher; 35 import android.text.style.QuoteSpan; 36 import android.text.style.StrikethroughSpan; [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 36 import android.text.SpannableString; 37 import android.text.Spanned; 38 import android.text.TextUtils; 39 import android.text.style.ClickableSpan; 40 import android.text.style.URLSpan; 79 final TextView textView = (TextView) getActivity().findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 82 final AccessibilityNodeInfo text = mUiAutomation.getRootInActiveWindow() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local 85 assertFalse("Standard text view should not support SET_TEXT", text.getActionList() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 88 text.getActions() & AccessibilityNodeInfo.ACTION_SET_TEXT); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 92 assertFalse(text.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, args)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() [all …]
|
/cts/libs/vogar-expect/src/vogar/util/ |
D | MarkResetConsole.java | 34 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/preference2/src/android/preference2/cts/ |
D | TestUtils.java | 87 UiObject text = new UiObject(new UiSelector().text(searchText)); in tapOnViewWithText() local 88 if (text.exists() || text.waitForExists(1000)) { in tapOnViewWithText() 89 text.click(); in tapOnViewWithText() 96 textScroll.scrollIntoView(new UiSelector().text(searchText)); in tapOnViewWithText() 97 text = new UiObject(new UiSelector().text(searchText)); in tapOnViewWithText() 98 text.click(); in tapOnViewWithText() 109 UiObject text = new UiObject(new UiSelector().text(searchText)); in isTextShown() local 110 if (text.exists() || text.waitForExists(1000)) { in isTextShown() 116 return textScroll.scrollIntoView(new UiSelector().text(searchText)); in isTextShown() 122 boolean isTextHidden(String text) { in isTextHidden() argument [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | VirtualContainerView.java | 31 import android.text.Editable; 32 import android.text.TextUtils; 33 import android.text.TextWatcher; 161 final String readOnlyText = line.label.text + ": ["; in onDraw() 162 final String writeText = line.text.text + "]"; in onDraw() 243 child.setText(item.text); in onProvideAutofillVirtualStructure() 244 if (TextUtils.getTrimmedLength(item.text) > 0) { in onProvideAutofillVirtualStructure() 247 child.setAutofillValue(AutofillValue.forText(item.text)); in onProvideAutofillVirtualStructure() 342 Line addLine(String labelId, String label, String textId, String text, int inputType) { in addLine() argument 343 final Line line = new Line(labelId, label, textId, text, inputType); in addLine() [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | ExtractedTextTest.java | 25 import android.text.Spannable; 26 import android.text.SpannableStringBuilder; 27 import android.text.Spanned; 28 import android.text.style.StyleSpan; 44 CharSequence text = "test"; in testWriteToParcel() local 45 extractedText.text = text; in testWriteToParcel() 59 assertEquals(extractedText.text.toString(), target.text.toString()); in testWriteToParcel()
|
D | BaseInputConnectionTest.java | 31 import android.text.Editable; 32 import android.text.Selection; 33 import android.text.Spannable; 34 import android.text.SpannableString; 35 import android.text.Spanned; 36 import android.text.TextUtils; 84 Spannable text = new SpannableString("Test ComposingSpans"); in testOpComposingSpans() local 85 BaseInputConnection.setComposingSpans(text); in testOpComposingSpans() 86 assertTrue(BaseInputConnection.getComposingSpanStart(text) > -1); in testOpComposingSpans() 87 assertTrue(BaseInputConnection.getComposingSpanEnd(text) > -1); in testOpComposingSpans() [all …]
|