Home
last modified time | relevance | path

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

12345678910>>...21

/cts/tests/tests/graphics/src/android/graphics/text/cts/
DMeasuredTextTest.java17 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 …]
DTextRunShaperTest.java17 package android.graphics.text.cts;
30 import android.graphics.text.PositionedGlyphs;
31 import android.graphics.text.TextRunShaper;
32 import android.text.Layout;
33 import android.text.TextDirectionHeuristic;
34 import android.text.TextDirectionHeuristics;
35 import android.text.TextPaint;
56 String text = "Hello, World."; in shapeText() local
60 text, 0, text.length(), 0, text.length(), 0f, 0f, false, paint); in shapeText()
92 String text = "Hello, World."; in shapeText_differentPaint() local
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DUnderlineSpanTest.java17 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 …]
DStrikethroughSpanTest.java17 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 …]
DTextAppearanceSpanTest.java17 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 …]
DDrawableMarginSpanTest.java17 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/cts/
DTextShaperTest.java17 package android.text.cts;
26 import android.graphics.text.PositionedGlyphs;
27 import android.graphics.text.TextRunShaper;
28 import android.text.Layout;
29 import android.text.SpannableString;
30 import android.text.Spanned;
31 import android.text.StaticLayout;
32 import android.text.TextDirectionHeuristic;
33 import android.text.TextDirectionHeuristics;
34 import android.text.TextPaint;
[all …]
DStaticLayoutLineBreakingTest.java17 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 …]
DSelectionTest.java17 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 …]
DSpannedTest.java17 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 …]
DSpannedStringTest.java17 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 …]
DSpannableStringTest.java17 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 …]
DSpannableStringBuilderTest.java17 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 …]
/cts/tests/tests/text/src/android/text/util/cts/
DRfc822TokenizerTest.java17 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/
DMultiAutoCompleteTextViewTest.java29 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 …]
DMultiAutoCompleteTextView_CommaTokenizerTest.java21 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/
DKeyListenerCtsActivity.java17 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 …]
DMetaKeyKeyListenerTest.java17 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 …]
DCharacterPickerDialogTest.java17 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 …]
DTextKeyListenerTest.java17 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/
DAccessibilityTextActionTest.java44 import android.text.SpannableString;
45 import android.text.Spanned;
46 import android.text.TextUtils;
47 import android.text.style.ClickableSpan;
48 import android.text.style.ImageSpan;
49 import android.text.style.ReplacementSpan;
50 import android.text.style.URLSpan;
124 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
127 final AccessibilityNodeInfo text = sUiAutomation.getRootInActiveWindow() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local
130 assertFalse("Standard text view should not support SET_TEXT", text.getActionList() in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
[all …]
/cts/tests/tests/preference/src/android/preference/cts/
DTestUtils.java96 void tapOnViewWithText(String text) { in tapOnViewWithText() argument
97 UiObject2 object2 = getTextObject(text); in tapOnViewWithText()
101 scrollToAndGetTextObject(text); in tapOnViewWithText()
102 getTextObject(text).click(); in tapOnViewWithText()
107 boolean isTextShown(String text) { in isTextShown() argument
108 if (getTextObject(text) != null) { in isTextShown()
112 return scrollToAndGetTextObject(text); in isTextShown()
115 boolean isTextHidden(String text) { in isTextHidden() argument
116 return getTextObject(text) == null; in isTextHidden()
119 boolean isTextFocused(String text) { in isTextFocused() argument
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/activities/
DVirtualContainerView.java31 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 public 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/
DExtractedTextTest.java24 import android.text.Annotation;
25 import android.text.Spannable;
26 import android.text.SpannableStringBuilder;
27 import android.text.Spanned;
54 final SpannableStringBuilder text = new SpannableStringBuilder( in getExpectedText() local
56 text.setSpan(EXPECTED_TEXT_ANNOTATION, 0, text.length(), in getExpectedText()
58 return text; in getExpectedText()
62 final SpannableStringBuilder text = new SpannableStringBuilder("hint"); in getExpectedHint() local
64 text.setSpan(EXPECTED_HINT_ANNOTATION, 1, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); in getExpectedHint()
65 return text; in getExpectedHint()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DCanvasTests.java582 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextNegativeIndex() local
585 new Canvas(getMutableBitmap()).drawText(text, -1, 7, 10, 10, getPaint()); in testDrawArrayTextNegativeIndex()
590 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextNegativeCount() local
593 new Canvas(getMutableBitmap()).drawText(text, 0, -1, 10, 10, getPaint()); in testDrawArrayTextNegativeCount()
598 final char[] text = { 'a', 'n', 'd', 'r', 'o', 'i', 'd' }; in testDrawArrayTextTextLengthTooSmall() local
602 new Canvas(getMutableBitmap()).drawText(text, 0, 10, 10, 10, getPaint()); in testDrawArrayTextTextLengthTooSmall()
664 final String text = "android"; in testDrawTextRunNegativeIndex() local
668 new Canvas(getMutableBitmap()).drawTextRun(text.toCharArray(), -1, text.length(), in testDrawTextRunNegativeIndex()
669 0, text.length(), 0.0f, 0.0f, in testDrawTextRunNegativeIndex()
675 final String text = "android"; in testDrawTextRunNegativeCount() local
[all …]

12345678910>>...21