/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewMinimumFontMetrics.kt | 51 val textView = TextView(context) in testMinimumFontHeight_NullByDefault() constant 52 assertThat(textView.minimumFontMetrics).isNull() // Null by default in testMinimumFontHeight_NullByDefault() 58 val textView = TextView(context) in testMinimumFontHeight_SetAndGet() constant 62 textView.minimumFontMetrics = fm in testMinimumFontHeight_SetAndGet() 63 assertThat(textView.minimumFontMetrics).isEqualTo(fm) in testMinimumFontHeight_SetAndGet() 69 val textView = TextView(context) in testMinimumFontHeight_SetToLayout() constant 73 textView.minimumFontMetrics = fm in testMinimumFontHeight_SetToLayout() 75 textView.measure( in testMinimumFontHeight_SetToLayout() 80 assertThat(textView.layout.minimumFontMetrics).isEqualTo(fm) in testMinimumFontHeight_SetToLayout() 86 val textView = TextView(context) in testIsUseLocalePreferredLineHeightForMinimum_SetGet() constant [all …]
|
D | TextViewSearchResultHighlightTest.java | 73 private Canvas prepareMockCanvas(TextView textView) { in prepareMockCanvas() argument 79 outRect.right = textView.getMeasuredWidth(); in prepareMockCanvas() 80 outRect.bottom = textView.getMeasuredHeight(); in prepareMockCanvas() 106 TextView textView = new TextView(mContext); in setAndGetNull() local 107 textView.setSearchResultHighlights(null); in setAndGetNull() 108 assertThat(textView.getSearchResultHighlights()).isNull(); in setAndGetNull() 113 TextView textView = new TextView(mContext); in setAndGet() local 115 textView.setSearchResultHighlights(ranges); in setAndGet() 116 assertThat(textView.getSearchResultHighlights()).isEqualTo(ranges); in setAndGet() 121 TextView textView = new TextView(mContext); in setAndGetColor() local [all …]
|
D | TextViewHighlightTest.java | 74 private Canvas prepareMockCanvas(TextView textView) { in prepareMockCanvas() argument 80 outRect.right = textView.getMeasuredWidth(); in prepareMockCanvas() 81 outRect.bottom = textView.getMeasuredHeight(); in prepareMockCanvas() 107 TextView textView = new TextView(mContext); in setAndGetNull() local 108 textView.setHighlights(null); in setAndGetNull() 109 assertThat(textView.getHighlights()).isNull(); in setAndGetNull() 114 TextView textView = new TextView(mContext); in setAndGet() local 119 textView.setHighlights(highlights); in setAndGet() 120 assertThat(textView.getHighlights()).isEqualTo(highlights); in setAndGet() 125 TextView textView = new TextView(mContext); in drawRect() local [all …]
|
D | TextViewUseBoundsForWidthTest.kt | 48 val textView = TextView(context) in testSetGetUseBoundsForWidth() constant 49 textView.useBoundsForWidth = true in testSetGetUseBoundsForWidth() 50 assertThat(textView.useBoundsForWidth).isTrue() in testSetGetUseBoundsForWidth() 52 textView.useBoundsForWidth = false in testSetGetUseBoundsForWidth() 53 assertThat(textView.useBoundsForWidth).isFalse() in testSetGetUseBoundsForWidth() 59 val textView = TextView(context) in testLayoutUseBoundsForTest() constant 60 textView.text = "Hello, World.\n This is Android." in testLayoutUseBoundsForTest() 62 textView.useBoundsForWidth = true in testLayoutUseBoundsForTest() 63 textView.measure(1024, 1024) in testLayoutUseBoundsForTest() 64 assertThat(textView.layout.useBoundsForWidth).isTrue() in testLayoutUseBoundsForTest() [all …]
|
D | TextViewFontScalingTest.kt | 67 val textView = TextView(activity) in <lambda>() constant 71 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeSp) in <lambda>() 72 textView.setLineHeight(TypedValue.COMPLEX_UNIT_SP, lineHeightSp) in <lambda>() 74 verifyLineHeightIsIntendedProportions(lineHeightSp, textSizeSp, activity, textView) in <lambda>() 85 val textView = TextView(activity) in <lambda>() constant 89 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeSp) in <lambda>() 90 textView.setLineHeight(TypedValue.COMPLEX_UNIT_SP, lineHeightSp) in <lambda>() 93 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, newTextSizeSp) in <lambda>() 95 verifyLineHeightIsIntendedProportions(lineHeightSp, newTextSizeSp, activity, textView) in <lambda>() 106 val textView = findTextView(activity, R.id.textview_lineheight2x) in <lambda>() constant [all …]
|
D | TextViewFadingEdgeTest.java | 156 MockTextView textView = createTextView(data.text, data.horizontalFadingEnabled, in testFadingEdge() local 160 data.expectationLeft, textView.getLeftFadingEdgeStrength(), DELTA); in testFadingEdge() 162 data.expectationRight, textView.getRightFadingEdgeStrength(), DELTA); in testFadingEdge() 168 final MockTextView textView = new MockTextView(mActivity); in createTextView() local 169 textView.setSingleLine(true); in createTextView() 170 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, TEXT_SIZE); in createTextView() 171 textView.setPadding(ANY_PADDING, ANY_PADDING, ANY_PADDING, ANY_PADDING); in createTextView() 172 textView.setFadingEdgeLength(ANY_FADE_LENGTH); in createTextView() 173 textView.setLayoutParams(new ViewGroup.LayoutParams(WIDTH, in createTextView() 175 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 | TextViewMouseInteractionTest.java | 126 final TextView textView = activity.findViewById(R.id.textView); in testFloatingToolbarByTouch() 127 textView.setTextIsSelectable(true); in testFloatingToolbarByTouch() 128 textView.setCustomSelectionActionModeCallback(mTestCallback); in testFloatingToolbarByTouch() 129 textView.setText(text); in testFloatingToolbarByTouch() 132 onView(allOf(withId(R.id.textView), withText(text))).check(matches(isDisplayed())); in testFloatingToolbarByTouch() 133 onView(withId(R.id.textView)).perform(new GeneralClickAction( in testFloatingToolbarByTouch() 145 final TextView textView = activity.findViewById(R.id.textView); in testFloatingToolbarByMouse() 146 textView.setTextIsSelectable(true); in testFloatingToolbarByMouse() 147 textView.setCustomSelectionActionModeCallback(mTestCallback); in testFloatingToolbarByMouse() 148 textView.setText(text); in testFloatingToolbarByMouse() [all …]
|
D | RemoteViewsTest.java | 270 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewText() local 271 assertEquals("", textView.getText().toString()); in testSetTextViewText() 276 assertEquals(expected, textView.getText().toString()); in testSetTextViewText() 280 assertEquals("", textView.getText().toString()); in testSetTextViewText() 288 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewTextSize() local 293 textView.getTextSize(), 0.001f); in testSetTextViewTextSize() 1111 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetCharSequence() local 1112 assertEquals("", textView.getText().toString()); in testSetCharSequence() 1117 assertEquals(expected, textView.getText().toString()); in testSetCharSequence() 1121 assertEquals("", textView.getText().toString()); in testSetCharSequence() [all …]
|
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 | TextViewTest.java | 628 private static void assertImeOptions(TextView textView, in assertImeOptions() argument 631 final int actualAction = textView.getImeOptions() & EditorInfo.IME_MASK_ACTION; in assertImeOptions() 632 final int actualFlags = textView.getImeOptions() & ~EditorInfo.IME_MASK_ACTION; in assertImeOptions() 841 final TextView textView = (TextView) mActivity.findViewById(R.id.textview_text); in testAccessHighlightColor() local 844 textView.setTextIsSelectable(true); in testAccessHighlightColor() 845 textView.setText("abcd", BufferType.EDITABLE); in testAccessHighlightColor() 846 textView.setHighlightColor(Color.BLUE); in testAccessHighlightColor() 850 assertTrue(textView.isTextSelectable()); in testAccessHighlightColor() 851 assertEquals(Color.BLUE, textView.getHighlightColor()); in testAccessHighlightColor() 856 mCtsTouchUtils.emulateLongPressOnViewCenter(mInstrumentation, mActivityRule, textView); in testAccessHighlightColor() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 132 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local 133 makeTextViewVisibleAndSetText(textView, mActivity.getString(R.string.a_b)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 149 TextUtils.equals(mActivity.getString(R.string.a_b), textView.getText())); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() 154 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testEditableTextView_shouldExposeAndRespondToSetTextAction() local 159 textView.setVisibility(View.VISIBLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 160 textView.setText(mActivity.getString(R.string.a_b), TextView.BufferType.EDITABLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 182 TextUtils.equals(textToSet, textView.getText())); in testEditableTextView_shouldExposeAndRespondToSetTextAction() 213 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testClickableSpan_shouldWorkFromAccessibilityService() local 217 assertEquals("Clickable span called back on wrong View", textView, widget); in testClickableSpan_shouldWorkFromAccessibilityService() 224 makeTextViewVisibleAndSetText(textView, textWithClickableSpan); in testClickableSpan_shouldWorkFromAccessibilityService() [all …]
|
/cts/hostsidetests/graphics/gpuprofiling/app/src/android/gpuprofiling/ |
D | GpuRenderStagesDeviceActivity.java | 44 TextView textView = new TextView(this); in onCreate() local 45 textView.setLayoutParams( in onCreate() 48 textView.setText("Initiating GPU work"); in onCreate() 56 setContentView(textView); in onCreate() 57 textView.startAnimation(fade); in onCreate()
|
/cts/tests/tests/gameservice/CtsGameServiceGame/src/android/service/games/cts/game/ |
D | MainActivity.java | 31 TextView textView = new TextView(this); in onCreate() local 32 textView.setText("This is a game"); in onCreate() 33 setContentView(textView); in onCreate() 35 WindowInsetsController windowInsetsController = textView.getWindowInsetsController(); in onCreate()
|
/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/tests/tests/gameservice/CtsGameServiceFalsePositiveGame/src/android/service/games/cts/falsepositive/ |
D | MainActivity.java | 29 TextView textView = new TextView(this); in onCreate() local 30 textView.setText("This is a game that should be filtered out by the game service"); in onCreate() 31 setContentView(textView); in onCreate()
|
/cts/tests/tests/gameservice/CtsGameServiceNotGame/src/android/service/games/cts/notgame/ |
D | MainActivity.java | 29 TextView textView = new TextView(this); in onCreate() local 30 textView.setText("This is not a game"); in onCreate() 31 setContentView(textView); in onCreate()
|
/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()
|
/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()
|
/cts/tests/sensitivecontentprotection/src/android/sensitivecontentprotection/cts/ |
D | SensitiveAutofillHintActivity.java | 36 TextView textView = new TextView(this); in onCreate() local 37 textView.setInputType(InputType.TYPE_CLASS_TEXT in onCreate() 39 addContentView(textView, wmlp); in onCreate()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/controls/ |
D | ControlsPanelVerifierBasicTest.java | 45 TextView textView = findViewById(R.id.text); in onCreate() local 48 textView.getLineHeight())); in onCreate() 50 textView.setText(builder); in onCreate()
|
/cts/tests/tests/sensorprivacy/test-apps/CtsUseMicOrCameraAndOverlayForSensorPrivacy/src/android/sensorprivacy/cts/usemiccamera/overlay/ |
D | OverlayActivity.kt | 25 val textView = TextView(this) in onCreate() constant 26 textView.text = "This Should Be Hidden" in onCreate() 27 frameLayout.addView(textView) in onCreate()
|
/cts/tests/tests/gameservice/src/android/service/games/ |
D | TestGameSessionService.java | 129 final TextView textView = new TextView(mContext); in onCreate() local 130 textView.setText("Overlay was rendered on: " + mPackageName); in onCreate() 131 textView.setBackgroundColor(Color.MAGENTA); in onCreate() 137 textView.setLayoutParams(textViewLayoutParams); in onCreate() 138 mRootView.addView(textView); in onCreate() 155 textView.addOnLayoutChangeListener( in onCreate()
|
/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()
|