/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewTest.java | 182 private TextView mTextView; field in TextViewTest 221 mTextView = findTextView(R.id.textview_text); in initTextViewForTyping() 222 mTextView.setKeyListener(QwertyKeyListener.getInstance(false, Capitalize.NONE)); in initTextViewForTyping() 223 mTextView.setText("", BufferType.EDITABLE); in initTextViewForTyping() 224 mTextView.requestFocus(); in initTextViewForTyping() 226 mTextView.setTextClassifier(TextClassifier.NO_OP); in initTextViewForTyping() 275 mTextView = new TextView(mActivity); in testGetLineHeight() 276 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight() 278 mTextView.setLineSpacing(1.2f, 1.5f); in testGetLineHeight() 279 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight() [all …]
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | ScrollingMovementMethodTest.java | 74 private TextView mTextView; field in ScrollingMovementMethodTest 86 mTextView = new TextViewNoIme(mActivity); in setup() 87 mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); in setup() 88 mTextView.setText(THREE_LINES_TEXT, BufferType.EDITABLE); in setup() 89 mSpannable = (Spannable) mTextView.getText(); in setup() 111 mTextView.setText("hello world", BufferType.SPANNABLE); in testOnTouchEventHorizontalMotion() 112 mTextView.setSingleLine(); in testOnTouchEventHorizontalMotion() 113 mSpannable = (Spannable) mTextView.getText(); in testOnTouchEventHorizontalMotion() 115 mActivity.setContentView(mTextView, in testOnTouchEventHorizontalMotion() 118 assertNotNull(mTextView.getLayout()); in testOnTouchEventHorizontalMotion() [all …]
|
D | TouchTest.java | 61 private TextView mTextView; field in TouchTest 71 mTextView = new TextViewNoIme(mActivity); in setup() 72 mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10); in setup() 81 mActivity.setContentView(mTextView, new ViewGroup.LayoutParams( in testScrollTo() 83 mTextView.setSingleLine(true); in testScrollTo() 84 mTextView.setLines(2); in testScrollTo() 87 TextPaint paint = mTextView.getPaint(); in testScrollTo() 88 final Layout layout = mTextView.getLayout(); in testScrollTo() 90 mActivityRule.runOnUiThread(() -> mTextView.setText(LONG_TEXT)); in testScrollTo() 97 () -> Touch.scrollTo(mTextView, layout, width - mTextView.getWidth() - 1, 0)); in testScrollTo() [all …]
|
D | BaseMovementMethodTest.java | 62 private TextView mTextView; field in BaseMovementMethodTest 78 mActivityRule.runOnUiThread(() -> mTextView = createTextView()); in testOnGenericMotionEvent_horizontalScroll() 80 mTextView.setSingleLine(); in testOnGenericMotionEvent_horizontalScroll() 81 mTextView.setText(testString, EDITABLE); in testOnGenericMotionEvent_horizontalScroll() 85 setContentView(mTextView, (int) mTextView.getPaint().measureText(testLine) / 3); in testOnGenericMotionEvent_horizontalScroll() 87 assertEquals(0, mTextView.getScrollX()); in testOnGenericMotionEvent_horizontalScroll() 89 final Spannable text = (Spannable) mTextView.getText(); in testOnGenericMotionEvent_horizontalScroll() 90 final double lineSpacing = Math.ceil(mTextView.getPaint().getFontSpacing()); in testOnGenericMotionEvent_horizontalScroll() 94 assertTrue(mMovementMethod.onGenericMotionEvent(mTextView, text, event)); in testOnGenericMotionEvent_horizontalScroll() 95 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mTextView, null); in testOnGenericMotionEvent_horizontalScroll() [all …]
|
D | ArrowKeyMovementMethodTest.java | 77 private TextView mTextView; field in ArrowKeyMovementMethodTest 98 activity.setContentView(mTextView); in setup() 99 mTextView.setFocusable(true); in setup() 100 mTextView.requestFocus(); in setup() 102 PollingCheck.waitFor(() -> mTextView.isFocused() && (mTextView.getLayout() != null)); in setup() 139 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_UP); in testOnTakeFocus() 146 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_LEFT); in testOnTakeFocus() 151 mActivityRule.runOnUiThread(mTextView::setSingleLine); in testOnTakeFocus() 154 assertNotNull(mTextView.getLayout()); in testOnTakeFocus() 155 assertEquals(1, mTextView.getLayout().getLineCount()); in testOnTakeFocus() [all …]
|
D | QwertyKeyListenerTest.java | 74 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 …]
|
D | MultiTapKeyListenerTest.java | 86 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 …]
|
D | DateTimeKeyListenerTest.java | 155 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener() 158 CtsKeyEventUtil.sendString(mInstrumentation, mTextView, "1"); in testDateTimeKeyListener() 160 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener() 163 CtsKeyEventUtil.sendString(mInstrumentation, mTextView, "2"); in testDateTimeKeyListener() 165 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener() 171 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_A); in testDateTimeKeyListener() 172 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener() 178 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_P); in testDateTimeKeyListener() 179 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener() 185 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_M); in testDateTimeKeyListener() [all …]
|
D | DigitsKeyListenerTest.java | 554 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1() 557 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_MINUS); in testDigitsKeyListener1() 558 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1() 561 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_1); in testDigitsKeyListener1() 562 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1() 565 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_PERIOD); in testDigitsKeyListener1() 566 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1() 569 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_2); in testDigitsKeyListener1() 570 assertEquals("12", mTextView.getText().toString()); in testDigitsKeyListener1() 589 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener2() [all …]
|
D | TimeKeyListenerTest.java | 152 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener() 155 CtsKeyEventUtil.sendString(mInstrumentation, mTextView, "1"); in testTimeKeyListener() 157 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener() 160 CtsKeyEventUtil.sendString(mInstrumentation, mTextView, "2"); in testTimeKeyListener() 162 assertEquals("12", mTextView.getText().toString()); in testTimeKeyListener() 168 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_A); in testTimeKeyListener() 169 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener() 175 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_P); in testTimeKeyListener() 176 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener() 182 CtsKeyEventUtil.sendKeyDownUp(mInstrumentation, mTextView, KeyEvent.KEYCODE_M); in testTimeKeyListener() [all …]
|
D | DateKeyListenerTest.java | 151 assertEquals("", mTextView.getText().toString()); in testDateTimeKeyListener() 154 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_1); in testDateTimeKeyListener() 155 assertEquals("1", mTextView.getText().toString()); in testDateTimeKeyListener() 158 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_2); in testDateTimeKeyListener() 159 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener() 164 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, keyCode); in testDateTimeKeyListener() 165 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener() 169 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_MINUS); in testDateTimeKeyListener() 170 assertEquals("12-", mTextView.getText().toString()); in testDateTimeKeyListener() 173 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_SLASH); in testDateTimeKeyListener() [all …]
|
D | BaseKeyListenerTest.java | 62 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 67 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 72 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 74 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 82 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 87 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 92 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 100 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 105 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() 109 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in verifyBackspace() [all …]
|
D | NumberKeyListenerTest.java | 146 mTextView.setText(text, BufferType.EDITABLE); in testPressKey() 147 mTextView.setKeyListener(mockNumberKeyListener); in testPressKey() 148 mTextView.requestFocus(); in testPressKey() 149 Selection.setSelection(mTextView.getText(), 0, 0); in testPressKey() 152 assertEquals("123456", mTextView.getText().toString()); in testPressKey() 154 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_0); in testPressKey() 155 assertEquals("0123456", mTextView.getText().toString()); in testPressKey() 160 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, keyCode); in testPressKey() 162 assertEquals("0123456", mTextView.getText().toString()); in testPressKey() 166 mTextView.setKeyListener(null); in testPressKey() [all …]
|
D | TextKeyListenerTest.java | 109 mTextView.setKeyListener(mockTextKeyListener); in testOnSpanAdded() 110 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded() 171 mTextView.setText(text, BufferType.EDITABLE); in testClear() 173 Editable content = mTextView.getText(); in testClear() 211 mTextView.setText("", BufferType.EDITABLE); in testPressKey() 212 Selection.setSelection(mTextView.getText(), 0, 0); in testPressKey() 213 mTextView.setKeyListener(textKeyListener); in testPressKey() 214 mTextView.requestFocus(); in testPressKey() 217 assertEquals("", mTextView.getText().toString()); in testPressKey() 219 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, KeyEvent.KEYCODE_4); in testPressKey() [all …]
|
D | ForwardDeleteTest.java | 48 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()
|
D | BackspaceTest.java | 48 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/ |
D | TextViewActivity.java | 30 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/ |
D | UiccTransactionEvent3EmulatorActivity.java | 48 TextView mTextView; field in UiccTransactionEvent3EmulatorActivity 58 mTextView = (TextView) findViewById(R.id.text); in onCreate() 59 mTextView.setTextSize(12.0f); in onCreate() 60 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate() 73 mTextView = (TextView) findViewById(R.id.text); in onNewIntent() 74 mTextView.setTextSize(12.0f); in onNewIntent() 109 …mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess() 118 …mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
|
D | UiccTransactionEvent2EmulatorActivity.java | 48 TextView mTextView; field in UiccTransactionEvent2EmulatorActivity 58 mTextView = (TextView) findViewById(R.id.text); in onCreate() 59 mTextView.setTextSize(12.0f); in onCreate() 60 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate() 73 mTextView = (TextView) findViewById(R.id.text); in onNewIntent() 74 mTextView.setTextSize(12.0f); in onNewIntent() 110 …mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess() 119 …mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
|
D | UiccTransactionEvent1EmulatorActivity.java | 48 TextView mTextView; field in UiccTransactionEvent1EmulatorActivity 58 mTextView = (TextView) findViewById(R.id.text); in onCreate() 59 mTextView.setTextSize(12.0f); in onCreate() 60 mTextView.setText(R.string.nfc_offhost_uicc_transaction_event_emulator_help); in onCreate() 73 mTextView = (TextView) findViewById(R.id.text); in onNewIntent() 74 mTextView.setTextSize(12.0f); in onNewIntent() 110 …mTextView.setText("Pass - NFC Action:" + getIntent().getAction() + " uri:" + getIntent().getDataSt… in initProcess() 119 …mTextView.setText("Fail - Action:" + getIntent().getAction() + " uri:" + getIntent().getDataString… in initProcess()
|
/cts/tests/tests/assist/src/android/assist/cts/ |
D | TestStartActivity.java | 36 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/dndsourceapp/src/android/server/wm/dndsourceapp/ |
D | DragSource.java | 46 private TextView mTextView; field in DragSource 90 mTextView = (TextView) findViewById(R.id.drag_source); in setUpDragSource() 91 mTextView.setText(mode); in setUpDragSource() 92 mTextView.setOnTouchListener(new View.OnTouchListener() { in setUpDragSource() 131 mTextView.setText(mTextView.getText() + "\n" + key + "=" + value); in logResult()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/ |
D | LlcpVersionActivity.java | 45 private TextView mTextView; field in LlcpVersionActivity 55 mTextView = (TextView) findViewById(R.id.text); in onCreate() 56 mTextView.setText(R.string.nfc_llcp_version_check_info); in onCreate() 109 mTextView.setText(R.string.nfc_llcp_version_check_failure); in createNdefMessage() 117 mTextView.setText(R.string.nfc_llcp_version_check_success); in createNdefMessage()
|
/cts/tests/framework/base/windowmanager/dndtargetappsdk23/src/android/server/wm/dndtargetappsdk23/ |
D | DropTarget.java | 36 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/CtsVerifier/src/com/android/cts/verifier/p2p/ |
D | RequesterTestActivity.java | 72 private TextView mTextView; field in RequesterTestActivity 113 mTextView = (TextView) findViewById(id.p2p_req_text); in onCreate() 183 mTextView.setText(msg); in onTestMsgReceived() 197 mTextView.setText(reason); in onTestFailed() 208 mTextView.setText(R.string.p2p_result_success); in onTestSuccess() 236 mTextView.setText(R.string.p2p_searching_target); in searchTarget() 260 mTextView.setText( in searchTarget()
|