/cts/tests/tests/graphics/src/android/graphics/text/cts/ |
D | MeasuredTextTest.java | 17 package android.graphics.text.cts; 31 import android.graphics.text.MeasuredText; 32 import android.text.PrecomputedText; 33 import android.text.SpannableStringBuilder; 34 import android.text.TextPaint; 61 String text = "Hello, World"; in testBuilder() local 62 new MeasuredText.Builder(text.toCharArray()) in testBuilder() 63 .appendStyleRun(sPaint, text.length(), false /* isRtl */).build(); in testBuilder() 68 String text = "Hello, World"; in testBuilder_FromExistingMeasuredText() local 69 final MeasuredText mt = new MeasuredText.Builder(text.toCharArray()) in testBuilder_FromExistingMeasuredText() [all …]
|
D | LineBreakerTest.java | 17 package android.graphics.text.cts; 19 import static android.graphics.text.LineBreaker.BREAK_STRATEGY_BALANCED; 20 import static android.graphics.text.LineBreaker.BREAK_STRATEGY_HIGH_QUALITY; 21 import static android.graphics.text.LineBreaker.BREAK_STRATEGY_SIMPLE; 22 import static android.graphics.text.LineBreaker.HYPHENATION_FREQUENCY_FULL; 23 import static android.graphics.text.LineBreaker.HYPHENATION_FREQUENCY_NONE; 24 import static android.graphics.text.LineBreaker.HYPHENATION_FREQUENCY_NORMAL; 25 import static android.graphics.text.LineBreaker.JUSTIFICATION_MODE_INTER_WORD; 26 import static android.graphics.text.LineBreaker.JUSTIFICATION_MODE_NONE; 27 import static android.graphics.text.LineBreaker.ParagraphConstraints; [all …]
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | UnderlineSpanTest.java | 17 package android.text.style.cts; 24 import android.text.SpannableString; 25 import android.text.Spanned; 26 import android.text.StaticLayout; 27 import android.text.TextPaint; 28 import android.text.style.UnderlineSpan; 95 private float textWidth(CharSequence text) { in textWidth() argument 100 text, 0, text.length(), tp, largeWidth).build(); in textWidth() 108 final SpannableString text = new SpannableString("P."); in testDoesntAffectWidth() local 109 final float origLineWidth = textWidth(text); in testDoesntAffectWidth() [all …]
|
D | StrikethroughSpanTest.java | 17 package android.text.style.cts; 24 import android.text.SpannableString; 25 import android.text.Spanned; 26 import android.text.StaticLayout; 27 import android.text.TextPaint; 28 import android.text.style.StrikethroughSpan; 98 private float textWidth(CharSequence text) { in textWidth() argument 103 text, 0, text.length(), tp, largeWidth).build(); in textWidth() 110 final SpannableString text = new SpannableString("P."); in testDoesntAffectWidth() local 111 final float origLineWidth = textWidth(text); in testDoesntAffectWidth() [all …]
|
D | TextAppearanceSpanTest.java | 17 package android.text.style.cts; 35 import android.text.TextPaint; 36 import android.text.style.TextAppearanceSpan; 171 android.text.cts.R.style.textAppearanceWithFontWeight); in testGetTextFontWeight() 175 android.text.cts.R.style.textAppearanceWithNoAttributes); in testGetTextFontWeight() 182 android.text.cts.R.style.textAppearanceWithTextLocales); in testGetTextLocales() 190 android.text.cts.R.style.textAppearanceWithShadow); in testGetShadowColor() 194 android.text.cts.R.style.textAppearanceWithNoAttributes); in testGetShadowColor() 201 android.text.cts.R.style.textAppearanceWithShadow); in testGetShadowDx() 205 android.text.cts.R.style.textAppearanceWithNoAttributes); in testGetShadowDx() [all …]
|
D | DrawableMarginSpanTest.java | 17 package android.text.style.cts; 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.cts.R; 32 import android.text.style.DrawableMarginSpan; 84 Spanned text = Html.fromHtml("<b>hello</b>"); in testDrawLeadingMargin() local 91 0, 0, text, 0, 0, true, layout); in testDrawLeadingMargin() [all …]
|
/cts/tests/tests/text/src/android/text/util/cts/ |
D | Rfc822TokenizerTest.java | 17 package android.text.util.cts; 22 import android.text.util.Rfc822Token; 23 import android.text.util.Rfc822Tokenizer; 53 String text = ", " + token1 + "\",\"" + token2 + ";" + token3 + " <;>" + token4; in testFindTokenStart() local 54 final int TOKEN_START_POS_1 = text.indexOf(token1); in testFindTokenStart() 55 final int TOKEN_START_POS_2 = text.indexOf(token2); in testFindTokenStart() 56 final int TOKEN_START_POS_3 = text.indexOf(token3); in testFindTokenStart() 57 final int TOKEN_START_POS_4 = text.indexOf(token4); in testFindTokenStart() 58 assertEquals(0, rfc822Tokenizer.findTokenStart(text, 0)); in testFindTokenStart() 59 assertEquals(0, rfc822Tokenizer.findTokenStart(text, TOKEN_START_POS_1)); in testFindTokenStart() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | MultiAutoCompleteTextViewTest.java | 29 import android.text.SpannableString; 30 import android.text.Spanned; 31 import android.text.TextUtils; 180 String text = "Android test."; in testPerformFiltering() local 181 multiAutoCompleteTextView.setText(text); in testPerformFiltering() 183 multiAutoCompleteTextView.performFiltering(text, KeyEvent.KEYCODE_0); in testPerformFiltering() 187 multiAutoCompleteTextView.performFiltering(text, 0, text.length(), KeyEvent.KEYCODE_E); in testPerformFiltering() 199 String text = "CTS."; in testReplaceText() local 200 multiAutoCompleteTextView.setText(text); in testReplaceText() 201 assertEquals(text, multiAutoCompleteTextView.getText().toString()); in testReplaceText() [all …]
|
D | MultiAutoCompleteTextView_CommaTokenizerTest.java | 21 import android.text.SpannableString; 22 import android.text.Spanned; 23 import android.text.style.UnderlineSpan; 106 String text = "end with comma,"; in testTerminateToken() local 107 assertEquals(text, mCommaTokenizer.terminateToken(text)); in testTerminateToken() 109 text = "end without comma"; in testTerminateToken() 111 assertEquals(text + ", ", mCommaTokenizer.terminateToken(text)); in testTerminateToken() 113 text = "end without comma!"; in testTerminateToken() 115 assertEquals(text + ", ", mCommaTokenizer.terminateToken(text)); in testTerminateToken() 117 text = "has ending spaces "; in testTerminateToken() [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; 28 import android.text.Editable; 29 import android.text.Selection; 30 import android.text.Spannable; 31 import android.text.Spanned; 32 import android.text.method.DateKeyListener; 33 import android.text.method.MetaKeyKeyListener; 151 Spannable text = Editable.Factory.getInstance().newEditable(str); in testResetMetaState() local 152 text.setSpan(Selection.SELECTION_START, 0, 0, Spanned.SPAN_POINT_POINT); in testResetMetaState() 153 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; 24 import android.text.Editable; 25 import android.text.Selection; 26 import android.text.method.CharacterPickerDialog; 76 Editable text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick() local 79 new CharacterPickerDialog(view.getContext(), view, text, "abc", false); in testOnItemClick() 83 Selection.setSelection(text, 0, 0); in testOnItemClick() 84 assertEquals(str, text.toString()); in testOnItemClick() 88 assertEquals("a123456", text.toString()); in testOnItemClick() 93 Selection.setSelection(text, 2, 2); in testOnItemClick() [all …]
|
D | TextKeyListenerTest.java | 17 package android.text.method.cts; 35 import android.text.Editable; 36 import android.text.InputType; 37 import android.text.Selection; 38 import android.text.Spannable; 39 import android.text.SpannableStringBuilder; 40 import android.text.method.TextKeyListener; 41 import android.text.method.TextKeyListener.Capitalize; 105 final Spannable text = new SpannableStringBuilder("123456"); in testOnSpanAdded() local 110 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 41 import android.text.SpannableString; 42 import android.text.Spanned; 43 import android.text.TextUtils; 44 import android.text.style.ClickableSpan; 45 import android.text.style.URLSpan; 107 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 110 final AccessibilityNodeInfo text = sUiAutomation.getRootInActiveWindow() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local 113 assertFalse("Standard text view should not support SET_TEXT", text.getActionList() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 116 text.getActions() & AccessibilityNodeInfo.ACTION_SET_TEXT); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 120 assertFalse(text.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, args)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | SelectionTest.java | 17 package android.text.cts; 24 import android.text.Layout; 25 import android.text.Selection; 26 import android.text.SpanWatcher; 27 import android.text.Spannable; 28 import android.text.SpannableStringBuilder; 29 import android.text.StaticLayout; 30 import android.text.TextPaint; 45 CharSequence text = "hello, world"; in testGetSelectionStart() local 46 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionStart() [all …]
|
D | StaticLayoutLineBreakingTest.java | 17 package android.text.cts; 23 import android.text.Layout; 24 import android.text.Layout.Alignment; 25 import android.text.SpannableStringBuilder; 26 import android.text.Spanned; 27 import android.text.StaticLayout; 28 import android.text.TextDirectionHeuristics; 29 import android.text.TextPaint; 30 import android.text.TextUtils; 31 import android.text.style.MetricAffectingSpan; [all …]
|
D | SpannedTest.java | 17 package android.text.cts; 22 import android.text.Spannable; 23 import android.text.SpannableString; 24 import android.text.SpannableStringBuilder; 25 import android.text.Spanned; 26 import android.text.SpannedString; 27 import android.text.style.LocaleSpan; 28 import android.text.style.QuoteSpan; 29 import android.text.style.UnderlineSpan; 75 final SpannableString text = new SpannableString("0123 5678"); in testNextSpanTransition() local [all …]
|
D | SpannedStringTest.java | 17 package android.text.cts; 24 import android.text.SpannedString; 47 String text = "test valueOf"; in testValueOf() local 48 SpannedString spanned = SpannedString.valueOf(text); in testValueOf() 49 assertEquals(text, spanned.toString()); in testValueOf() 51 spanned = new SpannedString(text); in testValueOf() 62 String text = "hello, world"; in testSubSequence() local 63 SpannedString spanned = new SpannedString(text); in testSubSequence() 69 subSequence = spanned.subSequence(0, text.length()); in testSubSequence() 71 assertEquals(text, subSequence.toString()); in testSubSequence() [all …]
|
D | SpannableStringTest.java | 17 package android.text.cts; 25 import android.text.Layout; 26 import android.text.SpannableString; 27 import android.text.SpannableStringBuilder; 28 import android.text.Spanned; 29 import android.text.method.SingleLineTransformationMethod; 30 import android.text.method.TransformationMethod; 31 import android.text.style.AlignmentSpan; 32 import android.text.style.LocaleSpan; 33 import android.text.style.QuoteSpan; [all …]
|
D | SpannableStringBuilderTest.java | 17 package android.text.cts; 27 import android.text.Editable; 28 import android.text.InputFilter; 29 import android.text.Selection; 30 import android.text.SpannableString; 31 import android.text.SpannableStringBuilder; 32 import android.text.Spanned; 33 import android.text.TextWatcher; 34 import android.text.style.QuoteSpan; 35 import android.text.style.StrikethroughSpan; [all …]
|
D | DynamicLayoutTest.java | 17 package android.text.cts; 19 import static android.text.Layout.Alignment.ALIGN_NORMAL; 20 import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; 30 import android.text.DynamicLayout; 31 import android.text.Layout; 32 import android.text.SpannableStringBuilder; 33 import android.text.StaticLayout; 34 import android.text.TextPaint; 35 import android.text.TextUtils; 36 import android.text.style.TypefaceSpan; [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | CanvasTests.java | 541 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextNegativeIndex() local 544 new Canvas(getMutableBitmap()).drawText(text, -1, 7, 10, 10, getPaint()); in testDrawArrayTextNegativeIndex() 549 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextNegativeCount() local 552 new Canvas(getMutableBitmap()).drawText(text, 0, -1, 10, 10, getPaint()); in testDrawArrayTextNegativeCount() 557 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextTextLengthTooSmall() local 561 new Canvas(getMutableBitmap()).drawText(text, 0, 10, 10, 10, getPaint()); in testDrawArrayTextTextLengthTooSmall() 623 final String text = "android"; in testDrawTextRunNegativeIndex() local 627 new Canvas(getMutableBitmap()).drawTextRun(text.toCharArray(), -1, text.length(), in testDrawTextRunNegativeIndex() 628 0, text.length(), 0.0f, 0.0f, in testDrawTextRunNegativeIndex() 634 final String text = "android"; in testDrawTextRunNegativeCount() local [all …]
|
/cts/tests/tests/preference/src/android/preference/cts/ |
D | TestUtils.java | 90 void tapOnViewWithText(String text) { in tapOnViewWithText() argument 91 UiObject2 object2 = getTextObject(text); in tapOnViewWithText() 95 scrollToAndGetTextObject(text); in tapOnViewWithText() 96 getTextObject(text).click(); in tapOnViewWithText() 101 boolean isTextShown(String text) { in isTextShown() argument 102 if (getTextObject(text) != null) { in isTextShown() 106 return scrollToAndGetTextObject(text); in isTextShown() 109 boolean isTextHidden(String text) { in isTextHidden() argument 110 return getTextObject(text) == null; in isTextHidden() 113 boolean isTextFocused(String text) { in isTextFocused() 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 | BaseInputConnectionTest.java | 28 import android.text.Editable; 29 import android.text.Selection; 30 import android.text.Spannable; 31 import android.text.SpannableString; 32 import android.text.Spanned; 33 import android.text.TextUtils; 85 Spannable text = new SpannableString("Test ComposingSpans"); in testOpComposingSpans() local 86 BaseInputConnection.setComposingSpans(text); in testOpComposingSpans() 87 assertTrue(BaseInputConnection.getComposingSpanStart(text) > -1); in testOpComposingSpans() 88 assertTrue(BaseInputConnection.getComposingSpanEnd(text) > -1); in testOpComposingSpans() [all …]
|