/aosp12/frameworks/base/core/tests/coretests/src/android/widget/ |
H A D | AutoCompleteTextViewPopup.java | 51 textView.requestFocus(); in testPopupSetListSelection() 72 clearText(textView); in testPopupSetListSelection() 83 textView.requestFocus(); in testPopupGetListSelection() 99 clearText(textView); in testPopupGetListSelection() 110 textView.requestFocus(); in testPopupClearListSelection() 132 clearText(textView); in testPopupClearListSelection() 143 textView.requestFocus(); in testPopupNavigateNoAdapter() 166 clearText(textView); in testPopupNavigateNoAdapter() 180 textView.requestFocus(); in testPopupShow() 190 textView.setText(""); in testPopupShow() [all …]
|
H A D | TextViewActivityTest.java | 314 textView.setSingleLine(true); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint() 315 textView.setHint("الروبوت"); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint() 346 assertTrue(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable() 351 assertFalse(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable() 356 assertTrue(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable() 361 assertFalse(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable() 385 textView.setText(text); in testToolbarMenuItemClickAfterSelectionChange() 438 assertTrue(textView.hasSelection()); in testSelectionRemovedWhenNonselectableTextLosesFocus() 444 assertFalse(textView.hasSelection()); in testSelectionRemovedWhenNonselectableTextLosesFocus() 483 textView.setText(content); in addLinkifiedTextToTextView() [all …]
|
H A D | TextViewFallbackLineSpacingTest.java | 96 final TextView textView = new TextView(activity); in testFallbackLineSpacing() local 97 textView.setTypeface(setup.getTypefaceFor("sans-serif")); in testFallbackLineSpacing() 98 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 100); in testFallbackLineSpacing() 100 textView.setText("aaaaa aabaa aaaaa", mBufferType); in testFallbackLineSpacing() 101 textView.setPadding(0, 0, 0, 0); in testFallbackLineSpacing() 102 textView.setIncludeFontPadding(false); in testFallbackLineSpacing() 103 textView.setFallbackLineSpacing(mEnabled); in testFallbackLineSpacing() 105 final int em = (int) Math.ceil(textView.getPaint().measureText("a")); in testFallbackLineSpacing() 108 textView.measure( in testFallbackLineSpacing() 111 textView.layout(0, 0, width, height); in testFallbackLineSpacing() [all …]
|
H A D | AutoCompleteTextViewCallbacks.java | 39 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupNoSelection() local 43 textView.requestFocus(); in testPopupNoSelection() 64 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupEnterSelection() local 68 textView.requestFocus(); in testPopupEnterSelection() 72 textView.post(new Runnable() { in testPopupEnterSelection() 90 textView.post(new Runnable() { in testPopupEnterSelection() 113 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupLeaveSelection() local 117 textView.requestFocus(); in testPopupLeaveSelection() 126 textView.post(new Runnable() { in testPopupLeaveSelection()
|
H A D | SuggestionsPopupWindowTest.java | 82 textView.post( in setSuggestionSpan() 103 textView.post(() -> textView.onTextContextMenuItem(TextView.ID_REPLACE)); in testOnTextContextMenuItem() 155 textView.post(() -> textView.onTextContextMenuItem(TextView.ID_REPLACE)); in showSuggestionsPopup() 367 assertTrue(textView.isCursorVisible()); in testCursorVisibility() 378 assertFalse(textView.isCursorVisible()); in testCursorVisibility() 384 assertTrue(textView.isCursorVisible()); in testCursorVisibility() 392 assertTrue(textView.isCursorVisible()); in testCursorVisibilityWhenImeConsumesInput() 405 assertFalse(textView.isCursorVisible()); in testCursorVisibilityWhenImeConsumesInput() 411 assertFalse(textView.isCursorVisible()); in testCursorVisibilityWhenImeConsumesInput() 420 textView.post(() -> textView.setImeConsumesInput(imeConsumesInput)); in setImeConsumesInputWithExpect() [all …]
|
/aosp12/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
H A D | TextViewPrecomputedTextPerfTest.java | 346 textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_RandomText() 348 textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_RandomText() 353 textView.onDraw(c); in testOnDraw_RandomText() 373 textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_RandomText_Selectable() 375 textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_RandomText_Selectable() 380 textView.onDraw(c); in testOnDraw_RandomText_Selectable() 402 textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_PrecomputedText() 404 textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_PrecomputedText() 409 textView.onDraw(c); in testOnDraw_PrecomputedText() 432 textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); in testOnDraw_PrecomputedText_Selectable() [all …]
|
H A D | TextViewOnMeasurePerfTest.java | 107 final TextView textView = new TextView(context); in testMeasure_AtMost() local 108 textView.setText(COMPLEX_MULTILINE_TEXT); in testMeasure_AtMost() 112 textView.setTextLocale(Locale.UK); in testMeasure_AtMost() 113 textView.setTextLocale(Locale.US); in testMeasure_AtMost() 125 textView.setText(COMPLEX_MULTILINE_TEXT); in testMeasure_Exactly() 129 textView.setTextLocale(Locale.UK); in testMeasure_Exactly() 130 textView.setTextLocale(Locale.US); in testMeasure_Exactly() 142 textView.setText(COMPLEX_MULTILINE_TEXT); in testMeasure_Unspecified() 146 textView.setTextLocale(Locale.UK); in testMeasure_Unspecified() 147 textView.setTextLocale(Locale.US); in testMeasure_Unspecified() [all …]
|
/aosp12/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/androidTest/java/com/android/car/ui/widget/ |
H A D | CarUiTextViewTest.java | 160 textView.setId(id); in testTextVariants_withCharLimit() 181 textView.setId(id); in testTextVariants_withCharLimitNoMaxLines() 201 textView.setId(id); in testTextVariants_noFit() 223 textView.setId(id); in testTextVariants() 243 textView.setId(id); in testTextTruncation_twoShortLines() 260 textView.setId(id); in testTextTruncation_oneLongOneShort_withMaxLines() 279 textView.setId(id); in testTextTruncation_oneLongOneShort_noMaxLines() 296 textView.setId(id); in testTextTruncation_twoLong_withMaxLines() 315 textView.setId(id); in testTitleTextTruncation_withMaxLines() 331 textView.setId(id); in testTextTruncation_twoLong_differentMaxLines() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/ |
H A D | OngoingCallChronometerTest.kt | 43 private lateinit var textView: OngoingCallChronometer 80 val initialTextLength = textView.measuredWidth 90 val xlWidth = textView.measuredWidth 116 val xlWidth = textView.measuredWidth 118 textView.base = 0L 129 textView.base = 0L 137 textView.setShouldHideText(true) 146 textView.setShouldHideText(true) 149 textView.setShouldHideText(false) 156 textView.text = text [all …]
|
/aosp12/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/ |
H A D | RichTextViewTest.java | 56 textView.setText(ssb); in testLinkAnnotation() 81 textView.setText(ssb); in testOnLinkClickListener() 84 textView.setOnLinkClickListener(listener); in testOnLinkClickListener() 88 CharSequence text = textView.getText(); in testOnLinkClickListener() 90 spans[0].onClick(textView); in testOnLinkClickListener() 105 textView.setText(ssb); in testLegacyContextOnClickListener() 107 CharSequence text = textView.getText(); in testLegacyContextOnClickListener() 109 spans[0].onClick(textView); in testLegacyContextOnClickListener() 121 textView.setText(ssb); in onTouchEvent_clickOnLinks_shouldReturnTrue() 139 textView.setText(ssb); in onTouchEvent_clickOutsideLinks_shouldReturnFalse() [all …]
|
/aosp12/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/ |
H A D | EnvReverbTest.java | 72 TextView textView; in onCreate() local 78 textView = findViewById(R.id.sessionText); in onCreate() 81 R.id.stop1, stop, textView, in onCreate() 85 R.id.stop1, stop, textView, in onCreate() 275 super (min, max, seekBar, textView, unit); in EnvReverbParam() 298 super (reverb, -9600, 0, seekBar, textView, "mB"); in RoomLevelParam() 320 super (reverb, -4000, 0, seekBar, textView, "mB"); in RoomHFLevelParam() 342 super (reverb, 200, 4000, seekBar, textView, "ms"); in DecayTimeParam() 386 super (reverb, -9600, 0, seekBar, textView, "mB"); in ReflectionsLevelParam() 408 super (reverb, 0, 65, seekBar, textView, "ms"); in ReflectionsDelayParam() [all …]
|
H A D | EqualizerTest.java | 71 TextView textView; in onCreate() local 100 textView = (TextView)findViewById(R.id.eqParam1Value); in onCreate() 111 textView = (TextView)findViewById(R.id.eqParam2Value); in onCreate() 122 textView = (TextView)findViewById(R.id.eqParam3Value); in onCreate() 133 textView = (TextView)findViewById(R.id.eqParam4Value); in onCreate() 144 textView = (TextView)findViewById(R.id.eqParam5Value); in onCreate() 151 textView = (TextView)findViewById(R.id.eqParam6Value); in onCreate() 231 TextView textView = (TextView)findViewById(viewId); in displayFreq() local 233 textView.setText(text); in displayFreq() 240 super (min, max, seekBar, textView, unit); in EqualizerParam() [all …]
|
/aosp12/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
H A D | AccessibilityContextMenuMaker.java | 55 public void registerWithActivity(TextView textView) { in registerWithActivity() argument 56 if (getSpans(getText(textView)).length == 0) { in registerWithActivity() 58 textView.setAccessibilityDelegate(null); in registerWithActivity() 59 textView.setClickable(false); in registerWithActivity() 60 textView.setLongClickable(false); in registerWithActivity() 64 mActivity.registerForContextMenu(textView); in registerWithActivity() 66 textView.setLongClickable(false); in registerWithActivity() 67 textView.setAccessibilityDelegate( in registerWithActivity() 91 Spanned spanned = getText(textView); in populateMenuContent() 102 span.onClick(textView); in populateMenuContent() [all …]
|
/aosp12/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/span/ |
H A D | LinkSpanTest.java | 39 final TextView textView = new TextView(context); in onClick_shouldCallListenerOnContext() local 42 linkSpan.onClick(textView); in onClick_shouldCallListenerOnContext() 51 final TextView textView = new TextView(application); in onClick_contextDoesNotImplementOnClickListener_shouldBeNoOp() local 54 linkSpan.onClick(textView); in onClick_contextDoesNotImplementOnClickListener_shouldBeNoOp() 64 final TextView textView = new TextView(wrapperContext); in onClick_contextWrapsOnClickListener_shouldCallWrappedListener() local 67 linkSpan.onClick(textView); in onClick_contextWrapsOnClickListener_shouldCallWrappedListener() 76 final TextView textView = new TextView(context); in onClick_shouldClearSelection() local 78 textView.setFocusable(true); in onClick_shouldClearSelection() 79 textView.setFocusableInTouchMode(true); in onClick_shouldClearSelection() 83 textView.setText(text); in onClick_shouldClearSelection() [all …]
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
H A D | ActionDisabledByAdminDialogHelperTest.java | 90 assertEquals(Shadows.shadowOf(textView).innerText(), in testSetAdminSupportTitle() 176 Shadows.shadowOf(textView).innerText()); in testSetAdminSupportDetails_shortSupportMessageIsNull() 198 Shadows.shadowOf(textView).innerText()); in testSetAdminSupportDetailsNotAdmin() 223 final TextView textView = new TextView(activity); in createAdminSupportDialogTitleTextView() local 224 textView.setId(R.id.admin_support_dialog_title); in createAdminSupportDialogTitleTextView() 225 view.addView(textView); in createAdminSupportDialogTitleTextView() 226 return textView; in createAdminSupportDialogTitleTextView() 231 final TextView textView = new TextView(activity); in createAdminSupportTextView() local 232 textView.setId(R.id.admin_support_msg); in createAdminSupportTextView() 233 view.addView(textView); in createAdminSupportTextView() [all …]
|
/aosp12/frameworks/base/core/tests/coretests/src/android/widget/espresso/ |
H A D | TextViewActions.java | 219 new CurrentHandleCoordinates(textView), in longPressAndDragHandle() 259 new CurrentHandleCoordinates(textView), in doubleTapAndDragHandle() 434 new CurrentHandleCoordinates(textView), in dragHandle() 470 public CurrentHandleCoordinates(TextView textView) { in CurrentHandleCoordinates() argument 471 mTextView = textView; in CurrentHandleCoordinates() 526 mTextView = textView; in HandleCoordinates() 645 final Layout layout = textView.getLayout(); in locateTextAtIndex() 647 return convertToScreenCoordinates(textView, in locateTextAtIndex() 662 textView.getLocationOnScreen(xy); in convertToScreenCoordinates() 663 return new float[]{ x + textView.getTotalPaddingLeft() - textView.getScrollX() + xy[0], in convertToScreenCoordinates() [all …]
|
/aosp12/frameworks/base/apct-tests/perftests/core/src/android/text/ |
H A D | TextViewSetTextMeasurePerfTest.java | 96 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE); in timeCreate() 98 textView.setText(text); in timeCreate() 103 textView.setTextLocale(Locale.UK); in timeCreate() 104 textView.setTextLocale(Locale.US); in timeCreate() 108 textView.setText(text); in timeCreate() 109 textView.measure(AT_MOST | mLineWidth, UNSPECIFIED); in timeCreate() 125 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE); in timeDraw() 126 textView.setText(text); in timeDraw() 134 textView.setTextLocale(Locale.UK); in timeDraw() 135 textView.setTextLocale(Locale.US); in timeDraw() [all …]
|
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
H A D | CursorAnchorInfoUtils.java | 98 @Nonnull final TextView textView) { in extractFromTextView() 114 final Layout layout = textView.getLayout(); in extractFromTextViewInternal() 121 final int selectionStart = textView.getSelectionStart(); in extractFromTextViewInternal() 122 builder.setSelectionRange(selectionStart, textView.getSelectionEnd()); in extractFromTextViewInternal() 125 final Matrix viewToScreenMatrix = new Matrix(textView.getMatrix()); in extractFromTextViewInternal() 127 textView.getLocationOnScreen(viewOriginInScreen); in extractFromTextViewInternal() 137 textView.getLineBounds(0, lineBoundsWithOffset); in extractFromTextViewInternal() 139 - lineBoundsWithoutOffset.left - textView.getScrollX(); in extractFromTextViewInternal() 141 - lineBoundsWithoutOffset.top - textView.getScrollY(); in extractFromTextViewInternal() 143 final CharSequence text = textView.getText(); in extractFromTextViewInternal() [all …]
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/ |
H A D | ViewPagerTabs.java | 158 final TextView textView = new TextView(getContext()); in addTab() local 159 textView.setText(tabTitle); in addTab() 160 textView.setBackgroundResource(R.drawable.contact_picker_tab_background_selector); in addTab() 161 textView.setGravity(Gravity.CENTER); in addTab() 162 textView.setOnClickListener(new OnClickListener() { in addTab() 171 textView.setTypeface(textView.getTypeface(), mTextStyle); in addTab() 174 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize); in addTab() 177 textView.setTextColor(mTextColor); in addTab() 179 textView.setAllCaps(mTextAllCaps); in addTab() 180 textView.setPadding(mSidePadding, 0, mSidePadding, 0); in addTab() [all …]
|
/aosp12/packages/apps/Contacts/src/com/android/contacts/detail/ |
H A D | ContactDisplayUtils.java | 194 if (textView == null) { in setDisplayName() 197 setDataOrHideIfNone(getDisplayName(context, contactData), textView); in setDisplayName() local 205 if (textView == null) { in setCompanyName() 208 setDataOrHideIfNone(getCompany(context, contactData), textView); in setCompanyName() local 216 if (textView == null) { in setPhoneticName() 227 if (textView == null) { in setAttribution() 230 setDataOrHideIfNone(getAttribution(context, contactData), textView); in setAttribution() local 239 textView.setText(textToDisplay); in setDataOrHideIfNone() 240 textView.setVisibility(View.VISIBLE); in setDataOrHideIfNone() 242 textView.setText(null); in setDataOrHideIfNone() [all …]
|
/aosp12/packages/apps/Dialer/java/com/android/dialer/about/ |
H A D | LicenseActivity.java | 43 TextView textView = (TextView) findViewById(R.id.license_activity_textview); in onCreate() local 49 textView.setText(licenseText); in onCreate() 56 TextView textView = (TextView) findViewById(R.id.license_activity_textview); in onSaveInstanceState() local 57 int firstVisibleLine = textView.getLayout().getLineForVertical(scrollView.getScrollY()); in onSaveInstanceState() 58 int firstVisibleChar = textView.getLayout().getLineStart(firstVisibleLine); in onSaveInstanceState() 71 TextView textView = (TextView) findViewById(R.id.license_activity_textview); in onRestoreInstanceState() 72 int firstVisibleLine = textView.getLayout().getLineForOffset(firstVisibleChar); in onRestoreInstanceState() 73 int offset = textView.getLayout().getLineTop(firstVisibleLine); in onRestoreInstanceState()
|
/aosp12/packages/apps/Dialer/java/com/android/incallui/audioroute/ |
H A D | AudioRouteSelectorDialogFragment.java | 110 ((LinearLayout) view).addView(textView, 0); in onCreateView() 114 TextView textView = in onCreateView() local 118 textView, in onCreateView() 122 ((LinearLayout) view).addView(textView, 0); in onCreateView() 179 TextView textView = in createBluetoothItem() local 181 textView.setText(getAliasName(bluetoothDevice)); in createBluetoothItem() 183 textView.setSelected(true); in createBluetoothItem() 184 textView.setTextColor(selectedColor); in createBluetoothItem() 186 textView.setCompoundDrawableTintMode(Mode.SRC_ATOP); in createBluetoothItem() 188 textView.setOnClickListener( in createBluetoothItem() [all …]
|
/aosp12/packages/apps/Dialer/java/com/android/contacts/common/list/ |
H A D | ViewPagerTabs.java | 149 textView.setText(Integer.toString(mUnreadCounts[position])); in addTab() 150 textView.setVisibility(View.VISIBLE); in addTab() 159 textView.setVisibility(View.INVISIBLE); in addTab() 164 final TextView textView = new TextView(getContext()); in addTab() local 165 textView.setText(tabTitle); in addTab() 166 textView.setClickable(true); in addTab() 170 textView.setTypeface(textView.getTypeface(), mTextStyle); in addTab() 176 textView.setTextColor(mTextColor); in addTab() 178 textView.setAllCaps(mTextAllCaps); in addTab() 179 textView.setGravity(Gravity.CENTER); in addTab() [all …]
|
/aosp12/packages/apps/Settings/src/com/android/settings/applications/intentpicker/ |
H A D | SupportedLinksAdapter.java | 64 final CheckedTextView textView = convertView.findViewById(android.R.id.text1); in getView() local 65 textView.setText(mWrapperList.get(position).getDisplayTitle(mContext)); in getView() 66 textView.setEnabled(mWrapperList.get(position).isEnabled()); in getView() 67 textView.setChecked(mWrapperList.get(position).isChecked()); in getView() 68 textView.setOnClickListener(l -> { in getView() 69 textView.toggle(); in getView() 70 mWrapperList.get(position).setChecked(textView.isChecked()); in getView()
|
/aosp12/packages/apps/Contacts/src/com/android/contacts/util/ |
H A D | PhoneNumberFormatter.java | 40 String countryCode, TextView textView, boolean formatAfterWatcherSet) { in TextWatcherLoadAsyncTask() argument 42 mTextView = textView; in TextWatcherLoadAsyncTask() 71 TextView textView) { in setPhoneNumberFormattingTextWatcher() argument 72 setPhoneNumberFormattingTextWatcher(context, textView, in setPhoneNumberFormattingTextWatcher() 84 Context context, TextView textView, boolean formatAfterWatcherSet) { in setPhoneNumberFormattingTextWatcher() argument 86 textView, formatAfterWatcherSet) in setPhoneNumberFormattingTextWatcher() local
|