/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewFadingEdgeTest.java | 148 MockTextView textView = createTextView(data.text, data.horizontalFadingEnabled, in testFadingEdge() local 152 data.expectationLeft, textView.getLeftFadingEdgeStrength(), DELTA); in testFadingEdge() 154 data.expectationRight, textView.getRightFadingEdgeStrength(), DELTA); in testFadingEdge() 160 final MockTextView textView = new MockTextView(mActivity); in createTextView() local 161 textView.setSingleLine(true); in createTextView() 162 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, TEXT_SIZE); in createTextView() 163 textView.setPadding(ANY_PADDING, ANY_PADDING, ANY_PADDING, ANY_PADDING); in createTextView() 164 textView.setFadingEdgeLength(ANY_FADE_LENGTH); in createTextView() 165 textView.setLayoutParams(new ViewGroup.LayoutParams(WIDTH, in createTextView() 167 textView.setHorizontalFadingEdgeEnabled(horizontalFadingEnabled); in createTextView() [all …]
|
D | TextViewIsHorizontallyScrollableTest.java | 53 final TextView textView = mViewGroup.findViewById( in testIsHorizontallyScrollingDefaultIsFalse() local 56 assertFalse(textView.isHorizontallyScrollable()); in testIsHorizontallyScrollingDefaultIsFalse() 61 final TextView textView = mViewGroup.findViewById( in testIsHorizontallyScrollingSameAsGiven() local 64 textView.setHorizontallyScrolling(true); in testIsHorizontallyScrollingSameAsGiven() 65 assertTrue(textView.isHorizontallyScrollable()); in testIsHorizontallyScrollingSameAsGiven() 70 final TextView textView = mViewGroup.findViewById( in testIsHorizontallyScrollingTrueToFalse() local 72 textView.setHorizontallyScrolling(true); in testIsHorizontallyScrollingTrueToFalse() 73 assertTrue(textView.isHorizontallyScrollable()); in testIsHorizontallyScrollingTrueToFalse() 75 textView.setHorizontallyScrolling(false); in testIsHorizontallyScrollingTrueToFalse() 76 assertFalse(textView.isHorizontallyScrollable()); in testIsHorizontallyScrollingTrueToFalse()
|
D | CursorAdapterTest.java | 214 TextView textView = new TextView(mContext); in testGetView() local 215 textView.setText("getView test"); in testGetView() 221 cursorAdapter.getView(0, textView, mParent); in testGetView() 228 cursorAdapter.getView(100, textView, mParent); in testGetView() 239 retView = (TextView) cursorAdapter.getView(1, textView, mParent); in testGetView() 251 TextView textView = (TextView) cursorAdapter.newDropDownView(mContext, mCursor, mParent); in testNewDropDownView() local 252 assertEquals(FIRST_NUMBER, textView.getText().toString()); in testNewDropDownView() 261 TextView textView = new TextView(mContext); in testGetDropDownView() local 262 textView.setText("getDropDownView test"); in testGetDropDownView() 264 assertNull(cursorAdapter.getDropDownView(0, textView, mParent)); in testGetDropDownView() [all …]
|
D | CursorTreeAdapterTest.java | 479 TextView textView = new TextView(mContext); in testGetGroupView() local 480 textView.setText(expectedStr); in testGetGroupView() 486 adapter.getGroupView(0, true, textView, mParent); in testGetGroupView() 495 adapter.getGroupView(10, true, textView, mParent); in testGetGroupView() 506 retView = (TextView) adapter.getGroupView(0, true, textView, mParent); in testGetGroupView() 592 TextView textView = new TextView(mContext); in testGetChildView() local 593 textView.setText(expectedStr); in testGetChildView() 599 adapter.getChildView(0, 0, true, textView, mParent); in testGetChildView() 607 adapter.getChildView(10, 0, true, textView, mParent); in testGetChildView() 616 adapter.getChildView(0, 2, true, textView, mParent); in testGetChildView() [all …]
|
D | ArrayAdapterTest.java | 146 final TextView textView = new TextView(mContext); in testAccessView() local 147 textView.setText(STR3); in testAccessView() 163 assertEquals(STR3, textView.getText()); in testAccessView() 164 assertSame(textView, mArrayAdapter.getView(0, textView, null)); in testAccessView() 165 assertSame(textView, mArrayAdapter.getDropDownView(0, textView, null)); in testAccessView() 166 assertEquals(STR1, textView.getText()); in testAccessView() 172 final TextView textView = new TextView(mContext); in testGetViewOutOfBoundsLow() local 173 mArrayAdapter.getView(-1, textView, null); in testGetViewOutOfBoundsLow() 179 final TextView textView = new TextView(mContext); in testDropDownGetViewOutOfBoundsLow() local 180 mArrayAdapter.getDropDownView(-1, textView, null); in testDropDownGetViewOutOfBoundsLow() [all …]
|
D | TextViewTest.java | 445 private static void assertImeOptions(TextView textView, in assertImeOptions() argument 448 final int actualAction = textView.getImeOptions() & EditorInfo.IME_MASK_ACTION; in assertImeOptions() 449 final int actualFlags = textView.getImeOptions() & ~EditorInfo.IME_MASK_ACTION; in assertImeOptions() 658 final TextView textView = (TextView) mActivity.findViewById(R.id.textview_text); in testAccessHighlightColor() local 661 textView.setTextIsSelectable(true); in testAccessHighlightColor() 662 textView.setText("abcd", BufferType.EDITABLE); in testAccessHighlightColor() 663 textView.setHighlightColor(Color.BLUE); in testAccessHighlightColor() 667 assertTrue(textView.isTextSelectable()); in testAccessHighlightColor() 668 assertEquals(Color.BLUE, textView.getHighlightColor()); in testAccessHighlightColor() 673 CtsTouchUtils.emulateLongPressOnViewCenter(mInstrumentation, mActivityRule, textView); in testAccessHighlightColor() [all …]
|
D | RemoteViewsTest.java | 199 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewText() local 200 assertEquals("", textView.getText().toString()); in testSetTextViewText() 205 assertEquals(expected, textView.getText().toString()); in testSetTextViewText() 209 assertEquals("", textView.getText().toString()); in testSetTextViewText() 218 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewTextSize() local 223 textView.getTextSize(), 0.001f); in testSetTextViewTextSize() 533 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetCharSequence() local 534 assertEquals("", textView.getText().toString()); in testSetCharSequence() 539 assertEquals(expected, textView.getText().toString()); in testSetCharSequence() 543 assertEquals("", textView.getText().toString()); in testSetCharSequence() [all …]
|
D | FrameLayoutTest.java | 166 final TextView textView = (TextView) frameLayout.findViewById(R.id.framelayout_textview); in testAccessMeasureAllChildren() local 167 WidgetTestUtils.assertScaledPixels(30, textView.getMeasuredHeight(), mActivity); in testAccessMeasureAllChildren() 168 WidgetTestUtils.assertScaledPixels(60, textView.getMeasuredWidth(), mActivity); in testAccessMeasureAllChildren() 169 assertEquals(textView.getMeasuredHeight(), frameLayout.getMeasuredHeight()); in testAccessMeasureAllChildren() 170 assertEquals(textView.getMeasuredWidth(), frameLayout.getMeasuredWidth()); in testAccessMeasureAllChildren() 174 textView.setVisibility(View.GONE); in testAccessMeasureAllChildren() 191 assertEquals(textView.getMeasuredHeight(), frameLayout.getMeasuredHeight()); in testAccessMeasureAllChildren() 192 assertEquals(textView.getMeasuredWidth(), frameLayout.getMeasuredWidth()); in testAccessMeasureAllChildren()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 107 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local 108 makeTextViewVisibleAndSetText(textView, mActivity.getString(R.string.a_b)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 124 TextUtils.equals(mActivity.getString(R.string.a_b), textView.getText())); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 129 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testEditableTextView_shouldExposeAndRespondToSetTextAction() local 134 textView.setVisibility(View.VISIBLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 135 textView.setText(mActivity.getString(R.string.a_b), TextView.BufferType.EDITABLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 157 TextUtils.equals(textToSet, textView.getText())); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 188 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testClickableSpan_shouldWorkFromAccessibilityService() local 192 assertEquals("Clickable span called back on wrong View", textView, widget); in testClickableSpan_shouldWorkFromAccessibilityService() 199 makeTextViewVisibleAndSetText(textView, textWithClickableSpan); in testClickableSpan_shouldWorkFromAccessibilityService() [all …]
|
D | AccessibilityTextTraversalTest.java | 524 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testActionNextAndPreviousAtGranularityCharacterOverText() local 529 textView.setVisibility(View.VISIBLE); in testActionNextAndPreviousAtGranularityCharacterOverText() 530 textView.setText(getString(R.string.a_b)); in testActionNextAndPreviousAtGranularityCharacterOverText() 580 assertEquals(1, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 581 assertEquals(1, Selection.getSelectionEnd(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 614 assertEquals(2, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 615 assertEquals(2, Selection.getSelectionEnd(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 648 assertEquals(3, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 649 assertEquals(3, Selection.getSelectionEnd(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() 656 assertEquals(3, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText() [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | MockApplicationActivity.java | 28 TextView textView = new TextView(this); in onCreate() local 29 textView.setText("Test"); in onCreate() 30 setContentView(textView); in onCreate()
|
/cts/hostsidetests/devicepolicy/app/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/ |
D | CrossProfileAppsStartActivityTest.java | 101 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartMainActivity() local 103 assertNotNull("Failed to start main activity in target user", textView); in testCanStartMainActivity() 105 String.valueOf(mUserSerialNumber), textView.getText()); in testCanStartMainActivity() 119 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW2)), in testCanStartNonMainActivity() local 121 assertNotNull("Failed to start non-main activity in target user", textView); in testCanStartNonMainActivity() 123 String.valueOf(mUserSerialNumber), textView.getText()); in testCanStartNonMainActivity()
|
D | NonMainActivity.java | 37 TextView textView = findViewById(R.id.user_textview2); in onStart() local 38 textView.setText(Long.toString(getCurrentUserSerialNumber())); in onStart()
|
D | MainActivity.java | 44 TextView textView = findViewById(R.id.user_textview); in onStart() local 45 textView.setText(Long.toString(getCurrentUserSerialNumber())); in onStart()
|
/cts/tests/fragment/src/android/fragment/cts/ |
D | LoaderActivity.java | 33 public TextView textView; field in LoaderActivity 42 textView = (TextView) findViewById(R.id.textA); in onCreate() 44 ViewGroup container = (ViewGroup) textView.getParent(); in onCreate() 64 textView.setText(data); in onLoadFinished()
|
D | NestedInflatedFragmentTest.java | 89 TextView textView = new TextView(inflater.getContext()); in onCreateView() local 90 textView.setText("Simple fragment"); in onCreateView() 91 return textView; in onCreateView()
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | BaseMovementMethodTest.java | 182 final TextView textView = new TextViewNoIme(mActivityRule.getActivity()); in createTextView() local 183 textView.setFocusable(true); in createTextView() 184 textView.setMovementMethod(mMovementMethod); in createTextView() 185 textView.setTextDirection(View.TEXT_DIRECTION_LTR); in createTextView() 186 return textView; in createTextView() 189 private void setContentView(@NonNull TextView textView, int textWidth) throws Throwable { in setContentView() argument 192 layout.addView(textView, new ViewGroup.LayoutParams(textWidth, WRAP_CONTENT)); in setContentView() 197 textView.requestFocus(); in setContentView() 200 assertTrue(textView.isFocused()); in setContentView()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | CrossProfileTestActivity.java | 49 TextView textView = (TextView) findViewById(R.id.text); in onCreate() local 56 textView.setText(R.string.provisioning_byod_cross_profile_app_work); in onCreate() 58 textView.setText(R.string.provisioning_byod_cross_profile_app_personal); in onCreate() 60 textView.setText(R.string.provisioning_byod_cross_profile_app_ctsverifier); in onCreate()
|
D | WorkStatusTestActivity.java | 54 TextView textView = (TextView) findViewById(R.id.text); in onStart() local 56 textView.setText(R.string.provisioning_byod_work_status_icon_activity); in onStart() 58 textView.setText(R.string.provisioning_byod_work_status_toast_activity); in onStart()
|
/cts/hostsidetests/testharness/app/src/android/testharness/app/ |
D | TestHarnessActivity.java | 51 final TextView textView = findViewById(R.id.text_view); in onResume() local 52 textView.postDelayed(() -> { in onResume() 55 textView.getWindowToken(), in onResume()
|
/cts/tests/tests/toast/src/android/widget/toast/cts/ |
D | BaseToastTest.java | 88 TextView textView = new TextView(mContext); in showToastsViaAddingWindow() local 89 textView.setText(BaseToastTest.class.getName()); in showToastsViaAddingWindow() 93 windowManager.addView(textView, params); in showToastsViaAddingWindow()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | RVCVXCheckTestActivity.java | 365 TextView textView = new TextView(this); 366 textView.setText(Html.fromHtml( 369 textView.setMovementMethod(LinkMovementMethod.getInstance()); 370 textView.setPadding(10, 0, 0, 0); 371 getTestLogger().logCustomView(textView); 409 TextView textView = (TextView) dialog.findViewById(android.R.id.message); 410 textView.setTextSize(9);
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
D | TestListAdapter.java | 397 TextView textView; in getView() local 400 textView = (TextView) mLayoutInflater.inflate(layout, parent, false); in getView() 402 textView = (TextView) convertView; in getView() 406 textView.setText(item.title); in getView() 407 textView.setPadding(PADDING, 0, PADDING, 0); in getView() 408 textView.setCompoundDrawablePadding(PADDING); in getView() 434 textView.setBackgroundResource(backgroundResource); in getView() 435 textView.setCompoundDrawablesWithIntrinsicBounds(0, 0, iconResource, 0); in getView() 438 return textView; in getView()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | FocusHandlingTest.java | 141 final TextView textView = new TextView(activity) { in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 147 textView.setText("textView"); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 148 textView.setPrivateImeOptions(marker); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 149 textView.requestFocus(); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 152 layout.addView(textView); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 268 final TextView textView = new TextView(context); in testFocusableWindowDoesNotInvalidateExistingInputConnection() 269 textView.setText("Test Text"); in testFocusableWindowDoesNotInvalidateExistingInputConnection() 270 popup.setContentView(textView); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
|
/cts/tests/tests/text/src/android/text/util/cts/ |
D | LinkifyTest.java | 402 TextView textView = new TextView(mContext); in testAddLinks_withTextView_addsLinksWhenDefaultSchemeIsNull() local 403 textView.setText("any https://android.com any android.com any"); in testAddLinks_withTextView_addsLinksWhenDefaultSchemeIsNull() 405 Linkify.addLinks(textView, pattern, null, null, null); in testAddLinks_withTextView_addsLinksWhenDefaultSchemeIsNull() 407 URLSpan[] spans = textView.getUrls(); in testAddLinks_withTextView_addsLinksWhenDefaultSchemeIsNull() 417 TextView textView = new TextView(mContext); in testAddLinks_withTextView_addsLinksWhenSchemesArrayIsNull() local 418 textView.setText("any https://android.com any android.com any"); in testAddLinks_withTextView_addsLinksWhenSchemesArrayIsNull() 420 Linkify.addLinks(textView, pattern, "http://", null, null); in testAddLinks_withTextView_addsLinksWhenSchemesArrayIsNull() 422 URLSpan[] spans = textView.getUrls(); in testAddLinks_withTextView_addsLinksWhenSchemesArrayIsNull() 433 TextView textView = new TextView(mContext); in testAddLinks_withTextView_prependsDefaultSchemeToBeginingOfLink() local 434 textView.setText("any android.com any"); in testAddLinks_withTextView_prependsDefaultSchemeToBeginingOfLink() [all …]
|