Home
last modified time | relevance | path

Searched refs:editText (Results 1 – 25 of 47) sorted by relevance

12

/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DFocusHandlingTest.java142 final EditText editText = new EditText(activity); in launchTestActivity()
143 editText.setPrivateImeOptions(marker); in launchTestActivity()
144 editText.setHint("editText"); in launchTestActivity()
145 editText.requestFocus(); in launchTestActivity()
146 editTextRef.set(editText); in launchTestActivity()
148 layout.addView(editText); in launchTestActivity()
156 final EditText editText = launchTestActivity(marker); in launchTestActivity() local
157 editText.post(() -> { in launchTestActivity()
158 final ViewTreeObserver observerForEditText = editText.getViewTreeObserver(); in launchTestActivity()
160 outEditHasWindowFocusRef.set(editText.hasWindowFocus())); in launchTestActivity()
[all …]
DEditTextImeSupportTest.java89 final EditText editText = new EditText(activity); in launchTestActivity()
90 editText.setPrivateImeOptions(marker); in launchTestActivity()
91 editText.setHint("editText"); in launchTestActivity()
92 editText.setText(initialText); in launchTestActivity()
93 editText.setSelection(initialSelectionStart, initialSelectionEnd); in launchTestActivity()
94 editText.requestFocus(); in launchTestActivity()
95 editTextRef.set(editText); in launchTestActivity()
97 layout.addView(editText); in launchTestActivity()
118 final EditText editText = launchTestActivity(marker, initialText, initialSelectionStart, in testSetTextTriggersRestartInput() local
142 runOnMainSync(() -> editText.setText(updatedText)); in testSetTextTriggersRestartInput()
[all …]
DSpellCheckerTest.kt133 val (_, editText) = startTestActivity() in <lambda>() constant
134 ctsTouchUtils.emulateTapOnViewCenter(instrumentation, null, editText) in <lambda>()
135 waitOnMainUntil({ editText.hasFocus() }, TIMEOUT) in <lambda>()
140 findSuggestionSpanWithFlags(editText, FLAG_MISSPELLED) != null in <lambda>()
143 emulateTapAtOffset(editText, 2) in <lambda>()
145 waitOnMainUntil({ isCursorInside(editText, 1, 4) }, TIMEOUT) in <lambda>()
151 waitOnMainUntil({ "$uniqueSuggestion " == editText.text.toString() }, TIMEOUT) in <lambda>()
154 findSuggestionSpanWithFlags(editText, FLAG_MISSPELLED) == null in <lambda>()
175 val (_, editText) = startTestActivity() in <lambda>() constant
176 ctsTouchUtils.emulateTapOnViewCenter(instrumentation, null, editText) in <lambda>()
[all …]
DImeInsetsVisibilityTest.java106 final EditText editText = editTextTestActivityPair.first; in testImeVisibilityWhenImeFocusableChildPopup() local
113 () -> editText.requestFocus() && imm.showSoftInput(editText, 0))); in testImeVisibilityWhenImeFocusableChildPopup()
121 () -> editText.getRootWindowInsets().isVisible(WindowInsets.Type.ime())); in testImeVisibilityWhenImeFocusableChildPopup()
133 () -> editText.getRootWindowInsets().isVisible(WindowInsets.Type.ime()), in testImeVisibilityWhenImeFocusableChildPopup()
154 final EditText editText = editTextTestActivityPair.first; in testImeVisibilityWhenImeFocusableGravityBottomChildPopup() local
161 () -> editText.requestFocus() && imm.showSoftInput(editText, 0))); in testImeVisibilityWhenImeFocusableGravityBottomChildPopup()
167 () -> editText.getRootWindowInsets().isVisible(WindowInsets.Type.ime())); in testImeVisibilityWhenImeFocusableGravityBottomChildPopup()
182 () -> editText.getRootWindowInsets().isVisible(WindowInsets.Type.ime()), in testImeVisibilityWhenImeFocusableGravityBottomChildPopup()
203 final EditText editText = editTextTestActivityPair.first; in testImeVisibilityWhenImeFocusableChildPopupOverlaps() local
210 () -> editText.requestFocus() && imm.showSoftInput(editText, 0))); in testImeVisibilityWhenImeFocusableChildPopupOverlaps()
[all …]
DKeyboardVisibilityControlTest.java257 final EditText editText = launchTestActivity(marker); in testBasicShowHideSoftInput() local
264 getOnMainSync(() -> imm.hasActiveInputConnection(editText))); in testBasicShowHideSoftInput()
268 getOnMainSync(() -> imm.showSoftInput(editText, 0))); in testBasicShowHideSoftInput()
278 getOnMainSync(() -> imm.hideSoftInputFromWindow(editText.getWindowToken(), 0))); in testBasicShowHideSoftInput()
325 final EditText editText = launchTestActivity(marker); in verifyHideImeBackPressed() local
327 editorRef.set(editText); in verifyHideImeBackPressed()
328 final TestActivity testActivity = (TestActivity) editText.getContext(); in verifyHideImeBackPressed()
344 getOnMainSync(() -> imm.hasActiveInputConnection(editText))); in verifyHideImeBackPressed()
348 getOnMainSync(() -> imm.showSoftInput(editText, 0))); in verifyHideImeBackPressed()
485 final EditText editText = launchTestActivity(marker); in testToggleSoftInput() local
[all …]
DImeSwitchingTest.java76 final EditText editText = new EditText(activity); in testSwitchingIme()
77 editText.setPrivateImeOptions(marker); in testSwitchingIme()
78 editText.setHint("editText"); in testSwitchingIme()
79 editText.requestFocus(); in testSwitchingIme()
80 layout.addView(editText); in testSwitchingIme()
122 final EditText editText = new EditText(activity); in testImeRemainsVisibleAfterSwitchingIme()
123 editText.setPrivateImeOptions(marker); in testImeRemainsVisibleAfterSwitchingIme()
124 editText.setHint("editText"); in testImeRemainsVisibleAfterSwitchingIme()
125 editText.requestFocus(); in testImeRemainsVisibleAfterSwitchingIme()
126 layout.addView(editText); in testImeRemainsVisibleAfterSwitchingIme()
[all …]
DExtractViewTest.java94 final EditText editText = startTestActivityAndReturnEditText(marker); in testOnCreateExtractTextView() local
99 () -> editText.getWindowInsetsController().show(WindowInsets.Type.ime())); in testOnCreateExtractTextView()
108 () -> assertThat(editText.getText().toString()).isEqualTo(text), TIMEOUT); in testOnCreateExtractTextView()
123 final EditText editText = startTestActivityAndReturnEditText(marker); in testOnCreateExtractTextViewWithCustomView() local
128 () -> editText.getWindowInsetsController().show(WindowInsets.Type.ime())); in testOnCreateExtractTextViewWithCustomView()
144 () -> assertThat(editText.getText().toString()).isEqualTo(text), TIMEOUT); in testOnCreateExtractTextViewWithCustomView()
159 final EditText editText = startTestActivityAndReturnEditText(marker); in testSetExtractView() local
164 () -> editText.getWindowInsetsController().show(WindowInsets.Type.ime())); in testSetExtractView()
182 () -> assertThat(editText.getText().toString()).isEqualTo(text), TIMEOUT); in testSetExtractView()
193 final EditText editText = new EditText(activity); in startTestActivityAndReturnEditText()
[all …]
DStylusHandwritingTest.java309 final EditText editText = launchTestActivity(marker); in testHandwritingNoInitOnDeviceWithNoStylus() local
310 imm.startStylusHandwriting(editText); in testHandwritingNoInitOnDeviceWithNoStylus()
330 final EditText editText = launchTestActivity(marker); in testHandwritingDoesNotStartWhenNoStylusDown() local
339 imm.startStylusHandwriting(editText); in testHandwritingDoesNotStartWhenNoStylusDown()
361 final EditText editText = launchTestActivity(marker); in testHandwritingStartAndFinish() local
371 final int startX = editText.getWidth() / 2; in testHandwritingStartAndFinish()
372 final int startY = editText.getHeight() / 2; in testHandwritingStartAndFinish()
373 TestUtils.injectStylusDownEvent(editText, startX, startY); in testHandwritingStartAndFinish()
376 imm.startStylusHandwriting(editText); in testHandwritingStartAndFinish()
396 TestUtils.injectStylusUpEvent(editText, startX, startY); in testHandwritingStartAndFinish()
[all …]
DImeInsetsControllerTest.java81 final EditText editText = new EditText(activity); in launchTestActivity()
82 editText.setPrivateImeOptions(TEST_MARKER); in launchTestActivity()
83 editText.setHint("editText"); in launchTestActivity()
84 editText.requestFocus(); in launchTestActivity()
85 editTextRef.set(editText); in launchTestActivity()
89 layout.addView(editText); in launchTestActivity()
109 final EditText editText = launchResult.first; in testChangeSizeWhileControlling() local
116 editText.setOnApplyWindowInsetsListener((v, insets) -> { in testChangeSizeWhileControlling()
131 editText.getWindowInsetsController().addOnControllableInsetsChangedListener( in testChangeSizeWhileControlling()
170 editText.setOnApplyWindowInsetsListener((v, insets) -> { in testChangeSizeWhileControlling()
DInputMethodStartInputLifecycleTest.java150 final EditText editText = focusedEditTextRef.get(); in testInputConnectionStateWhenScreenStateChanges() local
156 && editText.getWindowVisibility() != VISIBLE, TIMEOUT); in testInputConnectionStateWhenScreenStateChanges()
162 assertFalse(TestUtils.getOnMainSync(() -> imm.hasActiveInputConnection(editText))); in testInputConnectionStateWhenScreenStateChanges()
169 TestUtils.waitOnMainUntil(() -> !TextUtils.equals(editText.getText(), "Hi!"), TIMEOUT, in testInputConnectionStateWhenScreenStateChanges()
176 && editText.getWindowVisibility() == VISIBLE, TIMEOUT); in testInputConnectionStateWhenScreenStateChanges()
177 mCtsTouchUtils.emulateTapOnViewCenter(instrumentation, null, editText); in testInputConnectionStateWhenScreenStateChanges()
184 assertTrue(TestUtils.getOnMainSync(() -> imm.hasActiveInputConnection(editText))); in testInputConnectionStateWhenScreenStateChanges()
187 TestUtils.waitOnMainUntil(() -> TextUtils.equals(editText.getText(), "Hello!"), TIMEOUT, in testInputConnectionStateWhenScreenStateChanges()
210 final EditText editText = launchTestActivity(marker); in testNoStartNewInputWhileOtherProcessHasWindowFocus() local
211 TestUtils.runOnMainSync(() -> editText.requestFocus()); in testNoStartNewInputWhileOtherProcessHasWindowFocus()
[all …]
DOnScreenPositionTest.java79 final EditText editText = new EditText(activity); in testImeIsNotBehindNavBar()
80 editText.setPrivateImeOptions(marker); in testImeIsNotBehindNavBar()
81 editText.setHint("editText"); in testImeIsNotBehindNavBar()
82 editText.requestFocus(); in testImeIsNotBehindNavBar()
84 layout.addView(editText); in testImeIsNotBehindNavBar()
DAccessibilityInputMethodTest.java117 final EditText editText = new EditText(testActivity); in testLifecycle()
118 editText.setPrivateImeOptions(marker); in testLifecycle()
119 editText.requestFocus(); in testLifecycle()
120 layout.addView(editText); in testLifecycle()
159 final EditText editText = new EditText(testActivity); in testRestartInput()
160 editTextRef.set(editText); in testRestartInput()
161 editText.setPrivateImeOptions(marker); in testRestartInput()
162 editText.requestFocus(); in testRestartInput()
166 layout.addView(editText); in testRestartInput()
194 final EditText editText = editTextRef.get(); in testRestartInput() local
[all …]
DInputMethodStatsTest.java151 final var editText = new EditText(activity); in createLayout() local
152 editText.setId(EDIT_TEXT_ID); in createLayout()
153 editText.setText("Editable"); in createLayout()
159 layout.addView(editText); in createLayout()
161 editText.requestFocus(); in createLayout()
317 final EditText editText = activity.requireViewById(EDIT_TEXT_ID); in testFromUser_withImm_showImeRequestFinished()
318 editText.setShowSoftInputOnFocus(false); in testFromUser_withImm_showImeRequestFinished()
321 editText.setOnTouchListener((v, ev) -> { in testFromUser_withImm_showImeRequestFinished()
326 editText.getContext().getSystemService(InputMethodManager.class) in testFromUser_withImm_showImeRequestFinished()
327 .showSoftInput(editText, 0 /* flags */); in testFromUser_withImm_showImeRequestFinished()
[all …]
DNavigationBarColorTest.java147 final EditText editText = new EditText(activity); in launchTestActivity() local
148 editText.setPrivateImeOptions(TEST_MARKER); in launchTestActivity()
149 editText.setHint("editText"); in launchTestActivity()
150 editText.requestFocus(); in launchTestActivity()
151 layout.addView(editText); in launchTestActivity()
200 final EditText editText = new EditText(activity); in showDialogIfNecessary()
201 editText.setPrivateImeOptions(TEST_MARKER); in showDialogIfNecessary()
202 editText.setHint("editText"); in showDialogIfNecessary()
203 editText.requestFocus(); in showDialogIfNecessary()
205 .setView(editText) in showDialogIfNecessary()
DInputMethodServiceTest.java194 final EditText editText = new EditText(activity);
195 editText.setText("Editable");
196 editText.setPrivateImeOptions(mMarker);
197 layout.addView(editText);
198 editText.requestFocus();
481 final EditText editText = new EditText(activity) {
497 editText.setPrivateImeOptions(marker);
498 layout.addView(editText);
499 editText.requestFocus();
553 final EditText editText = new EditText(activity) {
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityTextTraversalTest.java787 final EditText editText = (EditText) mActivity.findViewById(R.id.edit); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend() local
792 editText.setVisibility(View.VISIBLE); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
793 editText.setText(getString(R.string.a_b)); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
794 Selection.removeSelection(editText.getText()); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
845 assertEquals(0, Selection.getSelectionStart(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
846 assertEquals(1, Selection.getSelectionEnd(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
879 assertEquals(0, Selection.getSelectionStart(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
880 assertEquals(2, Selection.getSelectionEnd(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
913 assertEquals(0, Selection.getSelectionStart(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
914 assertEquals(3, Selection.getSelectionEnd(editText.getText())); in testActionNextAndPreviousAtGranularityCharacterOverTextExtend()
[all …]
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/
DWindowFocusHandleService.java98 final EditText editText = new EditText(windowContext) { in createPopupTextView() local
119 editText.setOnFocusChangeListener((v, hasFocus) -> { in createPopupTextView()
120 if (v == editText) { in createPopupTextView()
122 (WindowManager.LayoutParams) editText.getLayoutParams(); in createPopupTextView()
128 wm.updateViewLayout(editText, params); in createPopupTextView()
132 editText.setOnTouchListener((v, event) -> { in createPopupTextView()
135 (WindowManager.LayoutParams) editText.getLayoutParams(); in createPopupTextView()
138 wm.updateViewLayout(editText, params); in createPopupTextView()
143 editText.setBackground(new ColorDrawable(Color.CYAN)); in createPopupTextView()
155 wm.addView(editText, params); in createPopupTextView()
[all …]
/cts/tests/tests/security/src/android/security/cts/CVE_2023_20953/
DPocActivity.java29 EditText editText = new EditText(this); in onCreate() local
30 editText.setText("CVE-2023-20955"); in onCreate()
31 setContentView(editText); in onCreate()
/cts/tests/tests/widget/src/android/widget/cts/
DEditTextTest.java401 final EditText editText = new EditText(context); in testHyphenationFrequencyDefaultValue() local
405 assertEquals(Layout.HYPHENATION_FREQUENCY_NORMAL, editText.getHyphenationFrequency()); in testHyphenationFrequencyDefaultValue()
407 assertEquals(Layout.HYPHENATION_FREQUENCY_NONE, editText.getHyphenationFrequency()); in testHyphenationFrequencyDefaultValue()
414 final EditText editText = new EditText(context); in testBreakStrategyDefaultValue() local
415 assertEquals(Layout.BREAK_STRATEGY_SIMPLE, editText.getBreakStrategy()); in testBreakStrategyDefaultValue()
462 GetTextEditText editText = new GetTextEditText(mActivity); in testGetTextNonEditable() local
482 GetTextEditText2 editText = new GetTextEditText2(mActivity); in testGetTextBeforeConstructor() local
728 EditText editText = new EditText(mActivity); in testInputTypeForConversionSuggestions() local
729 editText.setInputType(EditorInfo.TYPE_CLASS_TEXT in testInputTypeForConversionSuggestions()
731 editText.setText(mActivity.getResources().getText(R.string.even_more_long_text)); in testInputTypeForConversionSuggestions()
[all …]
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DShowWhenLockedAttrImeActivity.java31 final EditText editText = new EditText(this); in onCreate() local
34 layout.addView(editText); in onCreate()
38 editText.requestFocus(); in onCreate()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39622/src/android/security/cts/CVE_2021_39622/
DPocActivity.java32 EditText editText = new EditText(this); in onCreate() local
33 setContentView(editText); in onCreate()
34 editText.requestFocus(); in onCreate()
/cts/tests/tests/view/src/android/view/cts/
DView_IdsTest.java61 EditText editText = (EditText) activity.findViewById(R.id.entry); in testIds() local
67 assertNotNull(editText); in testIds()
76 editText.setId(0x1111); in testIds()
77 assertEquals(0x1111, editText.getId()); in testIds()
78 assertSame(editText, (EditText) activity.findViewById(0x1111)); in testIds()
/cts/tests/framework/base/windowmanager/src/android/server/wm/ime/
DMultiDisplaySecurityImeTests.java78 final EditText editText = imeTestActivitySession.getActivity().mEditText; in testNoInputConnectionForUntrustedVirtualDisplay() local
82 editText.getPrivateImeOptions()), NOT_EXPECT_TIMEOUT); in testNoInputConnectionForUntrustedVirtualDisplay()
87 editText.getLocationOnScreen(location); in testNoInputConnectionForUntrustedVirtualDisplay()
92 editorMatcher("onStartInput", editText.getPrivateImeOptions()), in testNoInputConnectionForUntrustedVirtualDisplay()
104 editText.getPrivateImeOptions()), NOT_EXPECT_TIMEOUT); in testNoInputConnectionForUntrustedVirtualDisplay()
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/
DOneTimeTextWatcher.java27 public OneTimeTextWatcher(String name, EditText editText, CharSequence expectedAutofillValue) { in OneTimeTextWatcher() argument
28 super(name, 1, editText, expectedAutofillValue); in OneTimeTextWatcher()
/cts/tests/tests/preference/src/android/preference/cts/
DEditTextPreferenceTest.java42 EditText editText = mEditTextPref.getEditText(); in testGetEditText() local
43 assertNotNull(editText); in testGetEditText()

12