Home
last modified time | relevance | path

Searched refs:mTextView (Results 1 – 25 of 41) sorted by relevance

12

/cts/tests/tests/widget/src/android/widget/cts/
DTextViewTest.java207 private TextView mTextView; field in TextViewTest
257 mTextView = findTextView(R.id.textview_text); in initTextViewForTyping()
258 mTextView.setKeyListener(QwertyKeyListener.getInstance(false, Capitalize.NONE)); in initTextViewForTyping()
259 mTextView.setText("", BufferType.EDITABLE); in initTextViewForTyping()
260 mTextView.requestFocus(); in initTextViewForTyping()
262 mTextView.setTextClassifier(TextClassifier.NO_OP); in initTextViewForTyping()
311 mTextView = new TextView(mActivity); in testGetLineHeight()
312 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight()
314 mTextView.setLineSpacing(1.2f, 1.5f); in testGetLineHeight()
315 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight()
[all …]
DTextViewReceiveContentTest.java106 private TextView mTextView; field in TextViewReceiveContentTest
115 mTextView = mActivity.findViewById(R.id.textview_text); in before()
141 mTextView.onCreateInputConnection(null); in testTextView_onCreateInputConnection_nullEditorInfo()
155 InputConnection ic = mTextView.onCreateInputConnection(editorInfo); in testTextView_onCreateInputConnection_noCustomReceiver()
167 mTextView.setOnReceiveContentListener(receiverMimeTypes, mMockReceiver); in testTextView_onCreateInputConnection_customReceiver()
171 InputConnection ic = mTextView.onCreateInputConnection(editorInfo); in testTextView_onCreateInputConnection_customReceiver()
185 mTextView.setOnReceiveContentListener(receiverMimeTypes, mMockReceiver); in testTextView_onCreateInputConnection_customReceiver_oldTargetSdk()
189 InputConnection ic = mTextView.onCreateInputConnection(editorInfo); in testTextView_onCreateInputConnection_customReceiver_oldTargetSdk()
222 int spanStart = mTextView.getEditableText().getSpanStart(underlineSpan); in testDefaultReceiver_onReceive_styledText()
250 int spanStart = mTextView.getEditableText().getSpanStart(underlineSpan); in testDefaultReceiver_onReceive_styledText_convertToPlainText()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DScrollingMovementMethodTest.java78 private TextView mTextView; field in ScrollingMovementMethodTest
95 mTextView = new TextViewNoIme(mActivity); in setup()
96 mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); in setup()
97 mTextView.setText(THREE_LINES_TEXT, BufferType.EDITABLE); in setup()
98 mTextView.setEllipsize(null); in setup()
99 mSpannable = (Spannable) mTextView.getText(); in setup()
122 mTextView.setText("hello world", BufferType.SPANNABLE); in testOnTouchEventHorizontalMotion()
123 mTextView.setSingleLine(); in testOnTouchEventHorizontalMotion()
124 mSpannable = (Spannable) mTextView.getText(); in testOnTouchEventHorizontalMotion()
126 mActivity.setContentView(mTextView, in testOnTouchEventHorizontalMotion()
[all …]
DTouchTest.java66 private TextView mTextView; field in TouchTest
81 mTextView = new TextViewNoIme(mActivity); in setup()
82 mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10); in setup()
83 mTextView.setEllipsize(null); in setup()
92 mActivity.setContentView(mTextView, new ViewGroup.LayoutParams( in testScrollTo()
94 mTextView.setSingleLine(true); in testScrollTo()
95 mTextView.setLines(2); in testScrollTo()
98 TextPaint paint = mTextView.getPaint(); in testScrollTo()
99 final Layout layout = mTextView.getLayout(); in testScrollTo()
101 mActivityRule.runOnUiThread(() -> mTextView.setText(LONG_TEXT)); in testScrollTo()
[all …]
DBaseMovementMethodTest.java67 private TextView mTextView; field in BaseMovementMethodTest
88 mActivityRule.runOnUiThread(() -> mTextView = createTextView()); in testOnGenericMotionEvent_horizontalScroll()
90 mTextView.setSingleLine(); in testOnGenericMotionEvent_horizontalScroll()
91 mTextView.setText(testString, EDITABLE); in testOnGenericMotionEvent_horizontalScroll()
95 setContentView(mTextView, (int) mTextView.getPaint().measureText(testLine) / 3); in testOnGenericMotionEvent_horizontalScroll()
97 assertEquals(0, mTextView.getScrollX()); in testOnGenericMotionEvent_horizontalScroll()
99 final Spannable text = (Spannable) mTextView.getText(); in testOnGenericMotionEvent_horizontalScroll()
100 final double lineSpacing = Math.ceil(mTextView.getPaint().getFontSpacing()); in testOnGenericMotionEvent_horizontalScroll()
104 assertTrue(mMovementMethod.onGenericMotionEvent(mTextView, text, event)); in testOnGenericMotionEvent_horizontalScroll()
105 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mTextView, null); in testOnGenericMotionEvent_horizontalScroll()
[all …]
DQwertyKeyListenerTest.java74 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
77 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
80 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
83 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
86 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
97 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
100 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
103 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
106 assertEquals("HELL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
109 assertEquals("HELLO", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DMultiTapKeyListenerTest.java86 mTextView.setKeyListener(mockMultiTapKeyListener); in testOnSpanAdded()
87 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded()
117 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
120 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
123 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
126 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
129 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
140 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
143 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
146 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DArrowKeyMovementMethodTest.java81 private TextView mTextView; field in ArrowKeyMovementMethodTest
110 activity.setContentView(mTextView); in setup()
111 mTextView.setFocusableInTouchMode(true); in setup()
112 mTextView.requestFocus(); in setup()
114 PollingCheck.waitFor(() -> mTextView.isFocused() && (mTextView.getLayout() != null)); in setup()
151 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_UP); in testOnTakeFocus()
158 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_LEFT); in testOnTakeFocus()
163 mActivityRule.runOnUiThread(mTextView::setSingleLine); in testOnTakeFocus()
166 assertNotNull(mTextView.getLayout()); in testOnTakeFocus()
167 assertEquals(1, mTextView.getLayout().getLineCount()); in testOnTakeFocus()
[all …]
DDateKeyListenerTest.java149 assertEquals("", mTextView.getText().toString()); in testDateTimeKeyListener()
152 sendKeys(mTextView, KeyEvent.KEYCODE_1); in testDateTimeKeyListener()
153 assertEquals("1", mTextView.getText().toString()); in testDateTimeKeyListener()
156 sendKeys(mTextView, KeyEvent.KEYCODE_2); in testDateTimeKeyListener()
157 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
162 sendKeys(mTextView, keyCode); in testDateTimeKeyListener()
163 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
167 sendKeys(mTextView, KeyEvent.KEYCODE_MINUS); in testDateTimeKeyListener()
168 assertEquals("12-", mTextView.getText().toString()); in testDateTimeKeyListener()
171 sendKeys(mTextView, KeyEvent.KEYCODE_SLASH); in testDateTimeKeyListener()
[all …]
DDateTimeKeyListenerTest.java153 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
156 sendString(mTextView, "1"); in testDateTimeKeyListener()
158 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
161 sendString(mTextView, "2"); in testDateTimeKeyListener()
163 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
169 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_A); in testDateTimeKeyListener()
170 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
176 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_P); in testDateTimeKeyListener()
177 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
183 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_M); in testDateTimeKeyListener()
[all …]
DTimeKeyListenerTest.java152 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
155 sendString(mTextView, "1"); in testTimeKeyListener()
157 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
160 sendString(mTextView, "2"); in testTimeKeyListener()
162 assertEquals("12", mTextView.getText().toString()); in testTimeKeyListener()
168 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_A); in testTimeKeyListener()
169 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
175 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_P); in testTimeKeyListener()
176 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
182 sendKeyDownUp(mTextView, KeyEvent.KEYCODE_M); in testTimeKeyListener()
[all …]
DBaseKeyListenerTest.java63 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
68 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
73 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
75 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
83 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
88 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
93 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
101 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
106 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
110 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace()
[all …]
DNumberKeyListenerTest.java144 mTextView.setText(text, BufferType.EDITABLE); in testPressKey()
145 mTextView.setKeyListener(mockNumberKeyListener); in testPressKey()
146 mTextView.requestFocus(); in testPressKey()
147 Selection.setSelection(mTextView.getText(), 0, 0); in testPressKey()
150 assertEquals("123456", mTextView.getText().toString()); in testPressKey()
152 sendKeys(mTextView, KeyEvent.KEYCODE_0); in testPressKey()
153 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
158 sendKeys(mTextView, keyCode); in testPressKey()
160 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
164 mTextView.setKeyListener(null); in testPressKey()
[all …]
DDigitsKeyListenerTest.java552 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
555 sendKeys(mTextView, KeyEvent.KEYCODE_MINUS); in testDigitsKeyListener1()
556 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
559 sendKeys(mTextView, KeyEvent.KEYCODE_1); in testDigitsKeyListener1()
560 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
563 sendKeys(mTextView, KeyEvent.KEYCODE_PERIOD); in testDigitsKeyListener1()
564 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
567 sendKeys(mTextView, KeyEvent.KEYCODE_2); in testDigitsKeyListener1()
568 assertEquals("12", mTextView.getText().toString()); in testDigitsKeyListener1()
587 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener2()
[all …]
DTextKeyListenerTest.java107 mTextView.setKeyListener(mockTextKeyListener); in testOnSpanAdded()
108 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded()
169 mTextView.setText(text, BufferType.EDITABLE); in testClear()
171 Editable content = mTextView.getText(); in testClear()
209 mTextView.setText("", BufferType.EDITABLE); in testPressKey()
210 Selection.setSelection(mTextView.getText(), 0, 0); in testPressKey()
211 mTextView.setKeyListener(textKeyListener); in testPressKey()
212 mTextView.requestFocus(); in testPressKey()
215 assertEquals("", mTextView.getText().toString()); in testPressKey()
217 sendKeys(mTextView, KeyEvent.KEYCODE_4); in testPressKey()
[all …]
DForwardDeleteTest.java48 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete()
49 mTextView.setKeyListener(mKeyListener); in forwardDelete()
50 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete()
53 assertTrue(mTextView.hasWindowFocus()); in forwardDelete()
56 mActivity.runOnUiThread(() -> mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent)); in forwardDelete()
59 state.mText = mTextView.getText(); in forwardDelete()
60 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete()
61 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete()
DBackspaceTest.java48 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace()
49 mTextView.setKeyListener(mKeyListener); in backspace()
50 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace()
53 assertTrue(mTextView.hasWindowFocus()); in backspace()
56 mActivityRule.runOnUiThread(() -> mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent)); in backspace()
59 state.mText = mTextView.getText(); in backspace()
60 state.mSelectionStart = mTextView.getSelectionStart(); in backspace()
61 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace()
/cts/tests/tests/assist/testapp/src/android/assist/testapp/
DTextViewActivity.java30 private TextView mTextView; field in TextViewActivity
39 mTextView = findViewById(R.id.text_view); in onCreate()
40 mTextView.setMovementMethod(new ScrollingMovementMethod()); in onCreate()
54 scrollX = mTextView.getWidth(); in onReceivedEventFromCaller()
55 scrollY = mTextView.getLayout().getLineTop(mTextView.getLineCount()) in onReceivedEventFromCaller()
56 - mTextView.getHeight(); in onReceivedEventFromCaller()
58 TextViewActivity.this.mTextView.scrollTo(scrollX, scrollY); in onReceivedEventFromCaller()
69 Log.i(TAG, "the max height of this textview is: " + mTextView.getHeight()); in onReceivedEventFromCaller()
70 Log.i(TAG, "the max line count of this text view is: " + mTextView.getMaxLines()); in onReceivedEventFromCaller()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/offhost/
DUiccTransactionEvent1EmulatorActivity.java33 TextView mTextView; field in UiccTransactionEvent1EmulatorActivity
47 mTextView = (TextView) findViewById(R.id.text); in onCreate()
48 mTextView.setTextSize(12.0f); in onCreate()
49 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate()
62 mTextView = (TextView) findViewById(R.id.text); in onNewIntent()
63 mTextView.setTextSize(12.0f); in onNewIntent()
99mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess()
108mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
DUiccTransactionEvent2EmulatorActivity.java33 TextView mTextView; field in UiccTransactionEvent2EmulatorActivity
47 mTextView = (TextView) findViewById(R.id.text); in onCreate()
48 mTextView.setTextSize(12.0f); in onCreate()
49 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate()
62 mTextView = (TextView) findViewById(R.id.text); in onNewIntent()
63 mTextView.setTextSize(12.0f); in onNewIntent()
99mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess()
108mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
DUiccTransactionEvent3EmulatorActivity.java33 TextView mTextView; field in UiccTransactionEvent3EmulatorActivity
47 mTextView = (TextView) findViewById(R.id.text); in onCreate()
48 mTextView.setTextSize(12.0f); in onCreate()
49 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate()
62 mTextView = (TextView) findViewById(R.id.text); in onNewIntent()
63 mTextView.setTextSize(12.0f); in onNewIntent()
98mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess()
107mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
/cts/tests/tests/assist/src/android/assist/cts/
DTestStartActivity.java36 private TextView mTextView; field in TestStartActivity
51 mTextView = findViewById(R.id.text_view); in onCreate()
115 scrollX = mTextView.getWidth(); in scrollText()
116 … scrollY = mTextView.getLayout().getLineTop(mTextView.getLineCount()) - mTextView.getHeight(); in scrollText()
123 mTextView.scrollTo(finalScrollX, finalScrollY); in scrollText()
/cts/tests/framework/base/windowmanager/dndtargetappsdk23/src/android/server/wm/dndtargetappsdk23/
DDropTarget.java36 private TextView mTextView; field in DropTarget
46 mTextView = (TextView) findViewById(R.id.drag_target); in onCreate()
47 mTextView.setOnDragListener(new OnDragListener()); in onCreate()
54 mTextView.setText(key + "=" + value); in logResult()
/cts/apps/CrossProfileTestApp/src/com/android/cts/crossprofilepermissioncontrol/
DTestActivity.java36 private TextView mTextView; field in TestActivity
43 mTextView = findViewById(R.id.cross_profile_app_text); in onCreate()
67 mTextView.setText(R.string.cross_profile_enabled); in updateText()
69 mTextView.setText(R.string.cross_profile_disabled); in updateText()
/cts/tests/translation/src/android/translation/cts/
DUiTranslationManagerTest.java146 private TextView mTextView; field in UiTranslationManagerTest
222 assertScreenText(mTextView, translatedText); in testTranslationAfterStartActivityOnSameTask()
250 final CharSequence originalText = mTextView.getText(); in testUiTranslation()
279 assertScreenText(mTextView, translatedText); in testUiTranslation()
280 assertThat(mTextView.getViewTranslationResponse()) in testUiTranslation()
285 assertScreenText(mTextView, originalText.toString()); in testUiTranslation()
289 assertScreenText(mTextView, translatedText); in testUiTranslation()
293 assertScreenText(mTextView, originalText.toString()); in testUiTranslation()
303 assertScreenText(mTextView, translatedText); in testUiTranslation()
308 assertScreenText(mTextView, originalText.toString()); in testUiTranslation()
[all …]

12