Home
last modified time | relevance | path

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

12

/frameworks/base/apct-tests/perftests/core/src/android/widget/
DEditTextLongTextPerfTest.java69 final EditText editText = new EditText(mActivityRule.getActivity()); in setupEditText() local
85 editText.setHeight(height); in setupEditText()
86 editText.setWidth(width); in setupEditText()
87 editText.setLayoutParams(new ViewGroup.LayoutParams(width, height)); in setupEditText()
90 activity.setContentView(editText); in setupEditText()
92 editText.setText(sb.toString(), TextView.BufferType.EDITABLE); in setupEditText()
93 editText.invalidate(); in setupEditText()
94 editText.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), in setupEditText()
96 editText.layout(0, 0, height, width); in setupEditText()
98 return editText; in setupEditText()
[all …]
DEditTextBackspacePerfTest.java89 private void prepareTextForBackspace(EditText editText) { in prepareTextForBackspace() argument
90 editText.setText(mText, TextView.BufferType.EDITABLE); in prepareTextForBackspace()
91 Selection.setSelection(editText.getText(), 0, 0); in prepareTextForBackspace()
95 editText.setLayoutParams(new ViewGroup.LayoutParams( in prepareTextForBackspace()
98 editText.invalidate(); in prepareTextForBackspace()
99 editText.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), in prepareTextForBackspace()
101 editText.layout(0, 0, 1024, 768); in prepareTextForBackspace()
105 editText.onKeyDown(RIGHT_ARROW_KEY_EVENT.getKeyCode(), RIGHT_ARROW_KEY_EVENT); in prepareTextForBackspace()
106 Assert.assertEquals(mCursorPos, Selection.getSelectionStart(editText.getText())); in prepareTextForBackspace()
112 EditText editText = new EditText(mActivityRule.getActivity()); in testBackspace() local
[all …]
DEditTextCursorMovementPerfTest.java88 EditText editText = new EditText(mActivityRule.getActivity()); in testCursorMovement()
90 editText.setText(mText, TextView.BufferType.EDITABLE); in testCursorMovement()
91 Selection.setSelection(editText.getText(), 0, 0); in testCursorMovement()
95 editText.setLayoutParams(new ViewGroup.LayoutParams( in testCursorMovement()
98 editText.invalidate(); in testCursorMovement()
99 editText.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), in testCursorMovement()
101 editText.layout(0, 0, 1024, 768); in testCursorMovement()
105 editText.onKeyDown(RIGHT_ARROW_KEY_EVENT.getKeyCode(), RIGHT_ARROW_KEY_EVENT); in testCursorMovement()
106 Assert.assertEquals(mCursorPos, Selection.getSelectionStart(editText.getText())); in testCursorMovement()
110 editText.onKeyDown(RIGHT_ARROW_KEY_EVENT.getKeyCode(), RIGHT_ARROW_KEY_EVENT); in testCursorMovement()
[all …]
/frameworks/base/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/
DAutoShowTest.java117 EditText editText = activity.getEditText(); in autoShow_hasFocusedView_notRequestFocus() local
123 editText, /*expectWindowFocus*/ false, /*expectViewFocus*/ false); in autoShow_hasFocusedView_notRequestFocus()
126 editText, /*expectWindowFocus*/ true, /*expectViewFocus*/ false); in autoShow_hasFocusedView_notRequestFocus()
129 verifyImeIsAlwaysHidden(editText); in autoShow_hasFocusedView_notRequestFocus()
146 EditText editText = activity.getEditText(); in autoShow_notFocusedView_notRequestFocus() local
152 editText, /*expectWindowFocus*/ false, /*expectViewFocus*/ false); in autoShow_notFocusedView_notRequestFocus()
155 editText, /*expectWindowFocus*/ true, /*expectViewFocus*/ false); in autoShow_notFocusedView_notRequestFocus()
158 verifyImeIsAlwaysHidden(editText); in autoShow_notFocusedView_notRequestFocus()
331 EditText editText = activity.getEditText(); in verifyAutoShowBehavior_forwardWithKeyboardOff() local
333 verifyWindowAndViewFocus(editText, /*expectWindowFocus*/ true, /*expectViewFocus*/ true); in verifyAutoShowBehavior_forwardWithKeyboardOff()
[all …]
DImeOpenCloseStressTest.java128 EditText editText = activity.getEditText(); in testShowHideWithInputMethodManager_waitingAnimationEnd() local
135 () -> !activity.isAnimating() && isImeShown(editText)); in testShowHideWithInputMethodManager_waitingAnimationEnd()
140 () -> !activity.isAnimating() && !isImeShown(editText)); in testShowHideWithInputMethodManager_waitingAnimationEnd()
246 EditText editText = activity.getEditText(); in testShowWithInputMethodManager_notRequestFocus() local
249 editText, /*expectWindowFocus*/ false, /*expectViewFocus*/ false); in testShowWithInputMethodManager_notRequestFocus()
252 editText, /*expectWindowFocus*/ true, /*expectViewFocus*/ false); in testShowWithInputMethodManager_notRequestFocus()
255 verifyImeIsAlwaysHidden(editText); in testShowWithInputMethodManager_notRequestFocus()
288 EditText editText = activity.getEditText(); in testShowHideWithWindowInsetsController_waitingAnimationEnd() local
295 () -> !activity.isAnimating() && isImeShown(editText)); in testShowHideWithWindowInsetsController_waitingAnimationEnd()
300 () -> !activity.isAnimating() && !isImeShown(editText)); in testShowHideWithWindowInsetsController_waitingAnimationEnd()
[all …]
DDefaultImeVisibilityTest.java95 EditText editText = activity.getEditText(); in showHideDefaultIme() local
109 verifyWindowAndViewFocus(editText, true, true); in showHideDefaultIme()
111 waitOnMainUntilImeIsShown(editText); in showHideDefaultIme()
114 waitOnMainUntilImeIsHidden(editText); in showHideDefaultIme()
/frameworks/base/core/tests/coretests/src/android/view/stylus/
DHandwritingInitiatorTest.java793 EditText editText = in startHandwriting_hidesHint() local
795 editText.setHint("hint"); in startHandwriting_hidesHint()
796 editText.setLayoutParams(new ViewGroup.LayoutParams( in startHandwriting_hidesHint()
799 verifyEditTextDrawsText(editText, "hint"); in startHandwriting_hidesHint()
802 mHandwritingInitiator.startHandwriting(editText); in startHandwriting_hidesHint()
804 verifyEditTextDrawsText(editText, null); in startHandwriting_hidesHint()
809 EditText editText = in startHandwriting_clearFocus_restoresHint() local
811 editText.setHint("hint"); in startHandwriting_clearFocus_restoresHint()
812 editText.setLayoutParams(new ViewGroup.LayoutParams(1024, 1024)); in startHandwriting_clearFocus_restoresHint()
813 editText.requestFocus(); in startHandwriting_clearFocus_restoresHint()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DTextViewAssertions.java208 EditText editText = (EditText) view;
209 Drawable drawable = editText.getEditorForTesting().getCursorDrawable();
219 diff = drawableBounds.left - editText.getScrollX() + drawablePadding.left;
223 int maxRight = editText.getWidth() - editText.getCompoundPaddingRight()
224 - editText.getCompoundPaddingLeft() + editText.getScrollX();
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/
DEditTextInputActivity.java36 final EditText editText = new EditText(this); in onCreate() local
40 editText.setWidth(400); in onCreate()
41 editText.setHeight(200); in onCreate()
42 setContentView(editText); in onCreate()
64 editText.getLocationOnScreen(coordinates); in onCreate()
69 float width = editText.getWidth(); in onCreate()
70 float height = editText.getHeight(); in onCreate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ui/
DChallengeDialogs.kt112 val editText = requireViewById<EditText>(R.id.controls_pin_input) in <lambda>() constant
113 editText.setHint(instructions) in <lambda>()
116 setInputType(editText, useAlphaCheckBox.isChecked()) in <lambda>()
118 setInputType(editText, useAlphaCheckBox.isChecked()) in <lambda>()
120 editText.requestFocus() in <lambda>()
158 private fun setInputType(editText: EditText, useTextInput: Boolean) { in <lambda>()
160 editText.setInputType( in <lambda>()
163 editText.setInputType( in <lambda>()
/frameworks/base/core/java/android/preference/
DEditTextPreference.java126 EditText editText = mEditText; in onBindDialogView() local
127 editText.setText(getText()); in onBindDialogView()
129 ViewParent oldParent = editText.getParent(); in onBindDialogView()
132 ((ViewGroup) oldParent).removeView(editText); in onBindDialogView()
134 onAddEditTextToDialogView(view, editText); in onBindDialogView()
150 protected void onAddEditTextToDialogView(View dialogView, EditText editText) { in onAddEditTextToDialogView() argument
154 container.addView(editText, ViewGroup.LayoutParams.MATCH_PARENT, in onAddEditTextToDialogView()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DCustomEditTextPreferenceTest.java54 final EditText editText = spy(new EditText(RuntimeEnvironment.application)); in bindDialogView_shouldRequestFocus() local
55 editText.setText(testText); in bindDialogView_shouldRequestFocus()
56 when(mView.findViewById(android.R.id.edit)).thenReturn(editText); in bindDialogView_shouldRequestFocus()
60 verify(editText).requestFocus(); in bindDialogView_shouldRequestFocus()
DCustomEditTextPreferenceComaptTest.java54 final EditText editText = spy(new EditText(RuntimeEnvironment.application)); in bindDialogView_shouldRequestFocus() local
55 editText.setText(testText); in bindDialogView_shouldRequestFocus()
56 when(mView.findViewById(android.R.id.edit)).thenReturn(editText); in bindDialogView_shouldRequestFocus()
60 verify(editText).requestFocus(); in bindDialogView_shouldRequestFocus()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DEditTextTypeActivity.java55 EditText editText = new EditText(this); in onCreate() local
56 editText.setText(sSeedText); in onCreate()
57 setContentView(editText); in onCreate()
/frameworks/base/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/
DImeEditorPopupDialogActivity.java41 final EditText editText = new EditText(this); in onCreate() local
42 editText.setHint("focused editText"); in onCreate()
44 .setView(editText) in onCreate()
/frameworks/base/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/
DImeAppHelper.kt42 val editText = in openIME() constant
45 requireNotNull(editText) { in openIME()
49 editText.click() in openIME()
DImeEditorPopupDialogAppHelper.kt37 val editText = uiDevice.wait(Until.findObject(By.text("focused editText")), FIND_TIMEOUT) in openIME() constant
39 requireNotNull(editText) { in openIME()
43 editText.click() in openIME()
/frameworks/base/apct-tests/perftests/utils/src/android/perftests/utils/
DPerfTestActivity.java53 final EditText editText = new EditText(this); in onCreate() local
54 editText.setId(ID_EDITOR); in onCreate()
55 layout.addView(editText); in onCreate()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DCustomEditTextPreferenceCompat.java85 final EditText editText = view.findViewById(android.R.id.edit); in onBindDialogView() local
86 if (editText != null) { in onBindDialogView()
87 editText.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES); in onBindDialogView()
88 editText.requestFocus(); in onBindDialogView()
DCustomEditTextPreference.java91 final EditText editText = view.findViewById(android.R.id.edit); in onBindDialogView() local
92 if (editText != null) { in onBindDialogView()
93 editText.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES); in onBindDialogView()
94 editText.requestFocus(); in onBindDialogView()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DRemoteInputViewTest.java168 EditText editText = view.findViewById(R.id.remote_input_text); in testSendRemoteInput_intentContainsResultsAndSource() local
169 editText.setText(TEST_REPLY); in testSendRemoteInput_intentContainsResultsAndSource()
203 EditText editText = view.findViewById(R.id.remote_input_text); in getTargetInputMethodUser() local
206 assertThat(editText.isEnabled()).isFalse(); in getTargetInputMethodUser()
208 assertThat(editText.isEnabled()).isTrue(); in getTargetInputMethodUser()
214 editorInfo.fieldId = editText.getId(); in getTargetInputMethodUser()
215 InputConnection ic = editText.onCreateInputConnection(editorInfo); in getTargetInputMethodUser()
333 EditText editText = view.findViewById(R.id.remote_input_text); in testUiEventLogging_openAndSend() local
334 editText.setText(TEST_REPLY); in testUiEventLogging_openAndSend()
363 EditText editText = view.findViewById(R.id.remote_input_text); in testUiEventLogging_openAndAttach() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/
DMediaOutputBroadcastDialogTest.java290 EditText editText = mMediaOutputBroadcastDialog.mAlertDialog.findViewById( in afterTextChanged_nameLengthMoreThanMax_showErrorMessage() local
299 editText.setText(moreThanMax); in afterTextChanged_nameLengthMoreThanMax_showErrorMessage()
314 EditText editText = mMediaOutputBroadcastDialog.mAlertDialog.findViewById( in afterTextChanged_enterValidNameAfterLengthMoreThanMax_noErrorMessage() local
323 editText.setText(testString); in afterTextChanged_enterValidNameAfterLengthMoreThanMax_noErrorMessage()
329 editText.setText(testString); in afterTextChanged_enterValidNameAfterLengthMoreThanMax_noErrorMessage()
344 EditText editText = mMediaOutputBroadcastDialog.mAlertDialog.findViewById( in afterTextChanged_codeLengthMoreThanMax_showErrorMessage() local
353 editText.setText(moreThanMax); in afterTextChanged_codeLengthMoreThanMax_showErrorMessage()
368 EditText editText = mMediaOutputBroadcastDialog.mAlertDialog.findViewById( in afterTextChanged_codeLengthLessThanMin_showErrorMessage() local
377 editText.setText(moreThanMax); in afterTextChanged_codeLengthLessThanMin_showErrorMessage()
/frameworks/base/core/java/android/view/
DHandwritingInitiator.java631 if (!handwritingCursorPosition() && view instanceof EditText editText in requestFocusWithoutReveal()
639 int offset = editText.getOffsetForPosition( in requestFocusWithoutReveal()
642 editText.setSelection(offset); in requestFocusWithoutReveal()
651 if (handwritingCursorPosition() && view instanceof EditText editText) { in requestFocusWithoutReveal()
654 int line = editText.getLineAtCoordinate(mState.mStylusDownY - mTempLocation[1]); in requestFocusWithoutReveal()
655 int paragraphEnd = TextUtils.indexOf(editText.getText(), '\n', in requestFocusWithoutReveal()
656 editText.getLayout().getLineStart(line)); in requestFocusWithoutReveal()
658 paragraphEnd = editText.getText().length(); in requestFocusWithoutReveal()
660 editText.setSelection(paragraphEnd); in requestFocusWithoutReveal()
/frameworks/opt/car/services/builtInServices/tests/src/com/android/server/inputmethod/
DImeSmokeTest.java134 UiObject editText = sDevice.findObject((new UiSelector().resourceId( in canOpenIME() local
136 editText.click(); in canOpenIME()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/
DCreateUserDialogControllerTest.java210 EditText editText = dialog.findViewById(R.id.user_name); in successCallback_isCalled_setNameAndAdminStatus() local
211 editText.setText(expectedNewName); in successCallback_isCalled_setNameAndAdminStatus()
232 EditText editText = dialog.findViewById(R.id.user_name); in successCallback_isCalled_setName_MultipleAdminDisabled() local
233 editText.setText(expectedNewName); in successCallback_isCalled_setName_MultipleAdminDisabled()

12