Home
last modified time | relevance | path

Searched refs:textView (Results 1 – 25 of 57) sorted by relevance

123

/cts/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/
DCrossProfileAppsStartActivityTest.java126 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartActivityByIntentWithInteractAcrossProfilesPermission() local
128 assertNotNull("Failed to start main activity in target user", textView); in testCanStartActivityByIntentWithInteractAcrossProfilesPermission()
130 String.valueOf(mUserSerialNumber), textView.getText()); in testCanStartActivityByIntentWithInteractAcrossProfilesPermission()
146 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartActivityByIntentWithInteractAcrossUsersPermission() local
148 assertNotNull("Failed to start main activity in target user", textView); in testCanStartActivityByIntentWithInteractAcrossUsersPermission()
150 String.valueOf(mUserSerialNumber), textView.getText()); in testCanStartActivityByIntentWithInteractAcrossUsersPermission()
166 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartActivityByIntentWithInteractAcrossUsersFullPermission() local
168 assertNotNull("Failed to start main activity in target user", textView); in testCanStartActivityByIntentWithInteractAcrossUsersFullPermission()
170 String.valueOf(mUserSerialNumber), textView.getText()); in testCanStartActivityByIntentWithInteractAcrossUsersFullPermission()
197 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartMainActivityByIntent() local
[all …]
DNonExportedActivity.java37 TextView textView = findViewById(R.id.user_textview_nonmain); in onStart() local
38 textView.setText(Long.toString(getCurrentUserSerialNumber())); in onStart()
DMainActivity.java43 TextView textView = findViewById(R.id.user_textview); in onStart() local
44 textView.setText(Long.toString(getCurrentUserSerialNumber())); in onStart()
DNonMainActivity.java46 TextView textView = findViewById(R.id.user_textview_nonmain); in onStart() local
47 textView.setText(Long.toString(getCurrentUserSerialNumber())); in onStart()
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewFadingEdgeTest.java148 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 …]
DTextViewIsHorizontallyScrollableTest.java53 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()
DRemoteViewsTest.java244 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewText() local
245 assertEquals("", textView.getText().toString()); in testSetTextViewText()
250 assertEquals(expected, textView.getText().toString()); in testSetTextViewText()
254 assertEquals("", textView.getText().toString()); in testSetTextViewText()
262 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetTextViewTextSize() local
267 textView.getTextSize(), 0.001f); in testSetTextViewTextSize()
649 TextView textView = (TextView) mResult.findViewById(R.id.remoteView_text); in testSetCharSequence() local
650 assertEquals("", textView.getText().toString()); in testSetCharSequence()
655 assertEquals(expected, textView.getText().toString()); in testSetCharSequence()
659 assertEquals("", textView.getText().toString()); in testSetCharSequence()
[all …]
DCursorAdapterTest.java214 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 …]
DCursorTreeAdapterTest.java479 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 …]
DArrayAdapterTest.java146 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 …]
DTextViewTest.java568 private static void assertImeOptions(TextView textView, in assertImeOptions() argument
571 final int actualAction = textView.getImeOptions() & EditorInfo.IME_MASK_ACTION; in assertImeOptions()
572 final int actualFlags = textView.getImeOptions() & ~EditorInfo.IME_MASK_ACTION; in assertImeOptions()
781 final TextView textView = (TextView) mActivity.findViewById(R.id.textview_text); in testAccessHighlightColor() local
784 textView.setTextIsSelectable(true); in testAccessHighlightColor()
785 textView.setText("abcd", BufferType.EDITABLE); in testAccessHighlightColor()
786 textView.setHighlightColor(Color.BLUE); in testAccessHighlightColor()
790 assertTrue(textView.isTextSelectable()); in testAccessHighlightColor()
791 assertEquals(Color.BLUE, textView.getHighlightColor()); in testAccessHighlightColor()
796 CtsTouchUtils.emulateLongPressOnViewCenter(mInstrumentation, mActivityRule, textView); in testAccessHighlightColor()
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityTextActionTest.java124 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction() local
125 makeTextViewVisibleAndSetText(textView, mActivity.getString(R.string.a_b)); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
141 TextUtils.equals(mActivity.getString(R.string.a_b), textView.getText())); in testNotEditableTextView_shouldNotExposeOrRespondToSetTextAction()
146 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testEditableTextView_shouldExposeAndRespondToSetTextAction() local
151 textView.setVisibility(View.VISIBLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction()
152 textView.setText(mActivity.getString(R.string.a_b), TextView.BufferType.EDITABLE); in testEditableTextView_shouldExposeAndRespondToSetTextAction()
174 TextUtils.equals(textToSet, textView.getText())); in testEditableTextView_shouldExposeAndRespondToSetTextAction()
205 final TextView textView = (TextView) mActivity.findViewById(R.id.text); in testClickableSpan_shouldWorkFromAccessibilityService() local
209 assertEquals("Clickable span called back on wrong View", textView, widget); in testClickableSpan_shouldWorkFromAccessibilityService()
216 makeTextViewVisibleAndSetText(textView, textWithClickableSpan); in testClickableSpan_shouldWorkFromAccessibilityService()
[all …]
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/
DTextViewActions.java95 TextView textView = (TextView) view; in calculateCoordinates() local
96 final Layout layout = textView.getLayout(); in calculateCoordinates()
99 textView.getLocationOnScreen(xy); in calculateCoordinates()
102 + textView.getTotalPaddingLeft() in calculateCoordinates()
103 - textView.getScrollX() in calculateCoordinates()
105 layout.getLineTop(line) + textView.getTotalPaddingTop() - textView.getScrollY() in calculateCoordinates()
/cts/tests/app/app/src/android/app/stubs/
DMockApplicationActivity.java28 TextView textView = new TextView(this); in onCreate() local
29 textView.setText("Test"); in onCreate()
30 setContentView(textView); in onCreate()
/cts/tests/fragment/src/android/fragment/cts/
DLoaderActivity.java33 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()
DNestedInflatedFragmentTest.java89 TextView textView = new TextView(inflater.getContext()); in onCreateView() local
90 textView.setText("Simple fragment"); in onCreateView()
91 return textView; in onCreateView()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DCrossProfileTestActivity.java49 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()
DWorkStatusTestActivity.java54 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/tests/tests/sensorprivacy/test-apps/CtsUseMicOrCameraAndOverlayForSensorPrivacy/src/android/sensorprivacy/cts/usemiccamera/overlay/
DOverlayActivity.kt25 val textView = TextView(this) in onCreate() constant
26 textView.text = "This Should Be Hidden" in onCreate()
27 frameLayout.addView(textView) in onCreate()
/cts/hostsidetests/testharness/app/src/android/testharness/app/
DTestHarnessActivity.java51 final TextView textView = findViewById(R.id.text_view); in onResume() local
52 textView.postDelayed(() -> { in onResume()
55 textView.getWindowToken(), in onResume()
/cts/tests/tests/text/src/android/text/method/cts/
DBaseMovementMethodTest.java182 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/tests/tests/text/src/android/text/cts/
DFontResourceTest.java70 private int measureText(TextView textView) { in measureText() argument
71 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 100f); // make 1em = 100px in measureText()
72 textView.measure( in measureText()
75 return textView.getLayout().getWidth(); in measureText()
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/ime/
DCtsBaseInputMethod.java91 final TextView textView = new TextView(this); in createInputViewInternal() local
92 textView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); in createInputViewInternal()
93 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20); in createInputViewInternal()
94 textView.setGravity(Gravity.CENTER); in createInputViewInternal()
95 textView.setText(getClass().getName()); in createInputViewInternal()
96 textView.setBackgroundColor(0xffffaa99); in createInputViewInternal()
97 layout.addView(textView); in createInputViewInternal()
/cts/tests/tests/toast/src/android/widget/toast/cts/
DBaseToastTest.java88 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/
DRVCVXCheckTestActivity.java370 TextView textView = new TextView(this);
371 textView.setText(Html.fromHtml(
374 textView.setMovementMethod(LinkMovementMethod.getInstance());
375 textView.setPadding(10, 0, 0, 0);
376 getTestLogger().logCustomView(textView);
414 TextView textView = (TextView) dialog.findViewById(android.R.id.message);
415 textView.setTextSize(9);

123