Home
last modified time | relevance | path

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

12

/cts/tests/tests/widget/src/android/widget/cts/
DTextViewTest.java117 private TextView mTextView; field in TextViewTest
153 mTextView = findTextView(R.id.textview_text); in initTextViewForTyping()
154 mTextView.setKeyListener(QwertyKeyListener.getInstance(false, Capitalize.NONE)); in initTextViewForTyping()
155 mTextView.setText("", BufferType.EDITABLE); in initTextViewForTyping()
156 mTextView.requestFocus(); in initTextViewForTyping()
183 mTextView = new TextView(mActivity); in testGetLineHeight()
184 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight()
186 mTextView.setLineSpacing(1.2f, 1.5f); in testGetLineHeight()
187 assertTrue(mTextView.getLineHeight() > 0); in testGetLineHeight()
193 mTextView = findTextView(R.id.textview_text); in testGetLayout()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DScrollingMovementMethodTest.java51 private TextView mTextView; field in ScrollingMovementMethodTest
64 mTextView = new TextViewNoIme(getActivity()); in setUp()
65 mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); in setUp()
66 mTextView.setText(THREE_LINES_TEXT, BufferType.EDITABLE); in setUp()
67 mSpannable = (Spannable) mTextView.getText(); in setUp()
95 mTextView.setText("hello world", BufferType.SPANNABLE); in testOnTouchEventHorizontalMotion()
96 mTextView.setSingleLine(); in testOnTouchEventHorizontalMotion()
97 mSpannable = (Spannable) mTextView.getText(); in testOnTouchEventHorizontalMotion()
99 getActivity().setContentView(mTextView, in testOnTouchEventHorizontalMotion()
103 assertNotNull(mTextView.getLayout()); in testOnTouchEventHorizontalMotion()
[all …]
DDateKeyListenerTest.java77 assertEquals("", mTextView.getText().toString()); in testDateTimeKeyListener()
80 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_1); in testDateTimeKeyListener()
81 assertEquals("1", mTextView.getText().toString()); in testDateTimeKeyListener()
84 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_2); in testDateTimeKeyListener()
85 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
90 mKeyEventUtil.sendKeys(mTextView, keyCode); in testDateTimeKeyListener()
91 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
95 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_MINUS); in testDateTimeKeyListener()
96 assertEquals("12-", mTextView.getText().toString()); in testDateTimeKeyListener()
99 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_SLASH); in testDateTimeKeyListener()
[all …]
DDateTimeKeyListenerTest.java80 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
83 mKeyEventUtil.sendString(mTextView, "1"); in testDateTimeKeyListener()
85 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
88 mKeyEventUtil.sendString(mTextView, "2"); in testDateTimeKeyListener()
90 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
96 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_A); in testDateTimeKeyListener()
97 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
103 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_P); in testDateTimeKeyListener()
104 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
110 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_M); in testDateTimeKeyListener()
[all …]
DQwertyKeyListenerTest.java43 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
46 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
49 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
52 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
55 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
65 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
68 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
71 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
74 assertEquals("HELL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
77 assertEquals("HELLO", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DMultiTapKeyListenerTest.java54 mTextView.setKeyListener(mockMultiTapKeyListener); in testOnSpanAdded()
55 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded()
83 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
86 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
89 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
92 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
95 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
105 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
108 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
111 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DTimeKeyListenerTest.java76 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
79 mKeyEventUtil.sendString(mTextView, "1"); in testTimeKeyListener()
81 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
84 mKeyEventUtil.sendString(mTextView, "2"); in testTimeKeyListener()
86 assertEquals("12", mTextView.getText().toString()); in testTimeKeyListener()
92 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_A); in testTimeKeyListener()
93 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
99 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_P); in testTimeKeyListener()
100 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
106 mKeyEventUtil.sendKeyDownUp(mTextView, KeyEvent.KEYCODE_M); in testTimeKeyListener()
[all …]
DArrowKeyMovementMethodTest.java54 private TextView mTextView; field in ArrowKeyMovementMethodTest
76 getActivity().setContentView(mTextView); in setUp()
77 mTextView.setFocusable(true); in setUp()
78 mTextView.requestFocus(); in setUp()
82 assertNotNull(mTextView.getLayout()); in setUp()
83 assertTrue(mTextView.isFocused()); in setUp()
117 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_UP); in testOnTakeFocus()
126 mArrowKeyMovementMethod.onTakeFocus(mTextView, mEditable, View.FOCUS_LEFT); in testOnTakeFocus()
134 mTextView.setSingleLine(); in testOnTakeFocus()
139 assertNotNull(mTextView.getLayout()); in testOnTakeFocus()
[all …]
DDigitsKeyListenerTest.java403 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
406 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_MINUS); in testDigitsKeyListener1()
407 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
410 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_1); in testDigitsKeyListener1()
411 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
414 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_PERIOD); in testDigitsKeyListener1()
415 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
418 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_2); in testDigitsKeyListener1()
419 assertEquals("12", mTextView.getText().toString()); in testDigitsKeyListener1()
437 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener2()
[all …]
DNumberKeyListenerTest.java138 mTextView.setText(text, BufferType.EDITABLE); in testPressKey()
139 mTextView.setKeyListener(mockNumberKeyListener); in testPressKey()
140 mTextView.requestFocus(); in testPressKey()
141 Selection.setSelection((Editable) mTextView.getText(), 0, 0); in testPressKey()
145 assertEquals("123456", mTextView.getText().toString()); in testPressKey()
147 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_0); in testPressKey()
148 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
153 mKeyEventUtil.sendKeys(mTextView, keyCode); in testPressKey()
155 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
160 mTextView.setKeyListener(null); in testPressKey()
[all …]
DBaseKeyListenerTest.java55 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
60 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
65 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
67 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
75 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
80 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
85 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
93 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
98 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
102 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace()
[all …]
DTextKeyListenerTest.java93 mTextView.setKeyListener(mockTextKeyListener); in testOnSpanAdded()
94 mTextView.setText(text, BufferType.EDITABLE); in testOnSpanAdded()
153 mTextView.setText(text, BufferType.EDITABLE); in testClear()
155 Editable content = (Editable) mTextView.getText(); in testClear()
192 mTextView.setText("", BufferType.EDITABLE); in testPressKey()
193 Selection.setSelection((Editable) mTextView.getText(), 0, 0); in testPressKey()
194 mTextView.setKeyListener(textKeyListener); in testPressKey()
195 mTextView.requestFocus(); in testPressKey()
199 assertEquals("", mTextView.getText().toString()); in testPressKey()
201 mKeyEventUtil.sendKeys(mTextView, KeyEvent.KEYCODE_4); in testPressKey()
[all …]
DForwardDeleteTest.java40 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete()
41 mTextView.setKeyListener(mKeyListener); in forwardDelete()
42 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete()
46 assertTrue(mTextView.hasWindowFocus()); in forwardDelete()
51 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in forwardDelete()
56 state.mText = mTextView.getText(); in forwardDelete()
57 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete()
58 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete()
DBackspaceTest.java40 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace()
41 mTextView.setKeyListener(mKeyListener); in backspace()
42 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace()
46 assertTrue(mTextView.hasWindowFocus()); in backspace()
51 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in backspace()
56 state.mText = mTextView.getText(); in backspace()
57 state.mSelectionStart = mTextView.getSelectionStart(); in backspace()
58 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace()
DKeyListenerTestCase.java52 protected EditText mTextView; field in KeyListenerTestCase
64 mTextView = (EditText) mActivity.findViewById(R.id.keylistener_textview); in setUp()
69 mTextView.setKeepScreenOn(true); in setUp()
82 mTextView.setKeyListener(keyListener); in setKeyListenerSync()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/
DGpsTestActivity.java46 private TextView mTextView; field in GpsTestActivity
62 mTextView = (TextView) findViewById(R.id.text); in onCreate()
63 mTextView.setTypeface(Typeface.MONOSPACE); in onCreate()
64 mTextView.setTextSize(15.0f); in onCreate()
72 mTextView.setText(""); in onResume()
89 return mTextView.getText().toString(); in getTestDetails()
128 mTextView.append(s); in log()
129 mTextView.append("\n"); in log()
141 int start = mTextView.getText().length(); in log()
142 mTextView.append(s); in log()
[all …]
/cts/tests/tests/assist/testapp/src/android/voiceinteraction/testapp/
DTextViewActivity.java42 private TextView mTextView; field in TextViewActivity
51 mTextView = (TextView) findViewById(R.id.text_view); in onCreate()
52 mTextView.setMovementMethod(new ScrollingMovementMethod()); in onCreate()
95 scrollX = mTextView.getWidth(); in onReceive()
96 scrollY = mTextView.getLayout().getLineTop(mTextView.getLineCount()) in onReceive()
97 - mTextView.getHeight(); in onReceive()
99 TextViewActivity.this.mTextView.scrollTo(scrollX, scrollY); in onReceive()
110 Log.i(TAG, "the max height of this textview is: " + mTextView.getHeight()); in onReceive()
111 Log.i(TAG, "the max line count of this text view is: " + mTextView.getMaxLines()); in onReceive()
/cts/hostsidetests/services/windowmanager/dndtargetappsdk23/src/android/wm/cts/dndtargetappsdk23/
DDropTarget.java38 private TextView mTextView; field in DropTarget
47 mTextView = (TextView) findViewById(R.id.drag_target); in onCreate()
48 mTextView.setOnDragListener(new OnDragListener()); in onCreate()
54 mTextView.setText(result); in logResult()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/
DLlcpVersionActivity.java45 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/tests/assist/src/android/assist/cts/
DTestStartActivity.java43 private TextView mTextView; field in TestStartActivity
58 mTextView = (TextView) findViewById(R.id.text_view); in onCreate()
149 scrollX = mTextView.getWidth(); in scrollText()
150 … scrollY = mTextView.getLayout().getLineTop(mTextView.getLineCount()) - mTextView.getHeight(); in scrollText()
153 mTextView.scrollTo(scrollX, scrollY); in scrollText()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DTapTestEmulatorActivity.java15 TextView mTextView; field in TapTestEmulatorActivity
24 mTextView = (TextView) findViewById(R.id.text); in onCreate()
32 mTextView.setText("Number of successful taps: 0/50."); in onResume()
57 mTextView.setText("Number of successful taps: " + Integer.toString(mNumTaps) + in onApduSequenceComplete()
DThroughputEmulatorActivity.java15 TextView mTextView; field in ThroughputEmulatorActivity
23 mTextView = (TextView) findViewById(R.id.text); in onCreate()
54 mTextView.setText("PASS. Total duration: " + Long.toString(duration) + " ms " + in onApduSequenceComplete()
58 mTextView.setText("FAIL. Total duration: " + Long.toString(duration) + " ms " + in onApduSequenceComplete()
DSimpleReaderActivity.java42 TextView mTextView; field in SimpleReaderActivity
57 mTextView = (TextView) findViewById(R.id.text); in onCreate()
58 mTextView.setTextSize(12.0f); in onCreate()
59 mTextView.setText(R.string.nfc_hce_type_selection); in onCreate()
135 mTextView.setText(sb.toString()); in onTagDiscovered()
145 mTextView.setText(sb.toString()); in onTagDiscovered()
159 mTextView.setText(sb.toString()); in onTagDiscovered()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/p2p/
DResponderTestActivity.java53 private TextView mTextView; field in ResponderTestActivity
87 mTextView = (TextView) findViewById(id.p2p_resp_text); in onCreate()
143 mTextView.setText(msg); in onTestMsgReceived()
153 mTextView.setText(getReadyMsgId()); in onTestSuccess()
164 mTextView.setText(reason); in onTestFailed()
DRequesterTestActivity.java72 private TextView mTextView; field in RequesterTestActivity
113 mTextView = (TextView) findViewById(id.p2p_req_text); in onCreate()
174 mTextView.setText(msg); in onTestMsgReceived()
188 mTextView.setText(reason); in onTestFailed()
199 mTextView.setText(R.string.p2p_result_success); in onTestSuccess()
212 mTextView.setText(R.string.p2p_searching_target); in searchTarget()
236 mTextView.setText( in searchTarget()

12