| /appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/ |
| D | AppCompatTextViewTest.java | 171 final AppCompatTextView textView = in testAppCompatAllCapsFalseOnButton() local 174 assertEquals("Text view is not in all caps", text, textView.getLayout().getText()); in testAppCompatAllCapsFalseOnButton() 179 final TextView textView = mContainer.findViewById(R.id.view_text_color_hex); in testTextColorSetHex() local 180 assertEquals(Color.RED, textView.getCurrentTextColor()); in testTextColorSetHex() 185 final TextView textView = mContainer.findViewById(R.id.view_text_color_csl); in testTextColorSetColorStateList() local 188 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_default), in testTextColorSetColorStateList() 189 textView.getCurrentTextColor()); in testTextColorSetColorStateList() 192 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_disabled), in testTextColorSetColorStateList() 193 textView.getCurrentTextColor()); in testTextColorSetColorStateList() 198 final TextView textView = mContainer.findViewById(R.id.view_text_color_primary); in testTextColorSetThemeAttrHex() local [all …]
|
| D | AppCompatToggleButtonTest.java | 71 final AppCompatToggleButton textView = mActivity.findViewById( in testCompoundDrawablesTint() local 75 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 87 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 93 final AppCompatToggleButton textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 97 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 109 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() 115 final AppCompatToggleButton textView = mActivity.findViewById( in testCompoundDrawablesTintList() local 121 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTintList() 133 onView(withId(textView.getId())).perform(setEnabled(false)); in testCompoundDrawablesTintList() 150 final AppCompatToggleButton textView = mActivity.findViewById( in testCompoundDrawablesTintMode() local [all …]
|
| D | AppCompatCheckedTextViewTest.java | 73 AppCompatCheckedTextView textView = in testFontResources() local 77 assertEquals(expected, textView.getTypeface()); in testFontResources() 83 final AppCompatCheckedTextView textView = in testCheckMarkDefault_isNull() local 85 final Drawable checkMark = CheckedTextViewCompat.getCheckMarkDrawable(textView); in testCheckMarkDefault_isNull() 172 final AppCompatCheckedTextView textView = mActivity.findViewById( in testCompoundDrawablesTint() local 176 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 188 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 194 final AppCompatCheckedTextView textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 198 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 210 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() [all …]
|
| D | AppCompatRadioButtonTest.java | 104 final AppCompatRadioButton textView = mActivity.findViewById( in testCompoundDrawablesTint() local 108 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 120 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 126 final AppCompatRadioButton textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 130 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 142 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() 148 final AppCompatRadioButton textView = mActivity.findViewById( in testCompoundDrawablesTintList() local 154 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTintList() 166 onView(withId(textView.getId())).perform(setEnabled(false)); in testCompoundDrawablesTintList() 183 final AppCompatRadioButton textView = mActivity.findViewById( in testCompoundDrawablesTintMode() local [all …]
|
| D | AppCompatAutoCompleteTextViewTest.java | 97 final AppCompatAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTint() local 101 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 113 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 119 final AppCompatAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 123 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 135 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() 141 final AppCompatAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTintList() local 149 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTintList() 161 onView(withId(textView.getId())).perform(scrollTo(), setEnabled(false)); in testCompoundDrawablesTintList() 178 final AppCompatAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTintMode() local [all …]
|
| D | AppCompatMultiAutoCompleteTextViewTest.java | 97 final AppCompatMultiAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTint() local 101 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 113 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 119 final AppCompatMultiAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 123 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 135 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() 142 final AppCompatMultiAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTintList() local 150 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTintList() 162 onView(withId(textView.getId())).perform(scrollTo(), setEnabled(false)); in testCompoundDrawablesTintList() 179 final AppCompatMultiAutoCompleteTextView textView = mActivity.findViewById( in testCompoundDrawablesTintMode() local [all …]
|
| D | AppCompatCheckBoxTest.java | 103 final AppCompatCheckBox textView = mActivity.findViewById( in testCompoundDrawablesTint() local 107 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 119 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 125 final AppCompatCheckBox textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 129 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 141 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() 147 final AppCompatCheckBox textView = mActivity.findViewById( in testCompoundDrawablesTintList() local 153 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTintList() 165 onView(withId(textView.getId())).perform(setEnabled(false)); in testCompoundDrawablesTintList() 182 final AppCompatCheckBox textView = mActivity.findViewById( in testCompoundDrawablesTintMode() local [all …]
|
| D | AppCompatTextViewFontScalingTest.kt | 61 val textView = AppCompatTextView(activity) in <lambda>() constant 65 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeSp) in <lambda>() 66 textView.setLineHeight(TypedValue.COMPLEX_UNIT_SP, lineHeightSp) in <lambda>() 68 verifyLineHeightIsIntendedProportions(lineHeightSp, textSizeSp, activity, textView) in <lambda>() 79 val textView = findTextView(activity, R.id.textview_lineheight2x) in <lambda>() constant 83 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeSp) in <lambda>() 84 textView.setLineHeight(TypedValue.COMPLEX_UNIT_SP, lineHeightSp) in <lambda>() 86 verifyLineHeightIsIntendedProportions(lineHeightSp, textSizeSp, activity, textView) in <lambda>() 97 val textView = findTextView(activity, R.id.textview_lineheight2x) in <lambda>() constant 101 verifyLineHeightIsIntendedProportions(lineHeightSp, textSizeSp, activity, textView) in <lambda>() [all …]
|
| D | AppCompatEditTextTest.java | 169 private void verifyTextHintColor(EditText textView, in verifyTextHintColor() argument 171 ColorStateList hintColorStateList = textView.getHintTextColors(); in verifyTextHintColor() 172 assertEquals(ContextCompat.getColor(textView.getContext(), expectedEnabledColor), in verifyTextHintColor() 174 assertEquals(ContextCompat.getColor(textView.getContext(), expectedDisabledColor), in verifyTextHintColor() 265 final AppCompatEditText textView = mActivity.findViewById( in testCompoundDrawablesTint() local 269 final Drawable drawable = textView.getCompoundDrawables()[0]; in testCompoundDrawablesTint() 281 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawablesTint() 287 final AppCompatEditText textView = mActivity.findViewById( in testCompoundDrawableRelativeTint() local 291 final Drawable drawable = TextViewCompat.getCompoundDrawablesRelative(textView)[0]; in testCompoundDrawableRelativeTint() 303 TextViewCompat.getCompoundDrawableTintList(textView)); in testCompoundDrawableRelativeTint() [all …]
|
| D | AppCompatTextViewKotlinTests.kt | 52 val textView: AppCompatTextView = in getPaint_setTypeface_worksWith_setFontVariationSettings() constant 59 assertThat(textView.paint.typeface.systemFontFamilyName).isEqualTo("sans-serif") in getPaint_setTypeface_worksWith_setFontVariationSettings() 60 assertThat(textView.typeface!!.systemFontFamilyName).isEqualTo("sans-serif") in getPaint_setTypeface_worksWith_setFontVariationSettings() 63 textView.paint.typeface = Typeface.create("cursive", Typeface.NORMAL) in getPaint_setTypeface_worksWith_setFontVariationSettings() 66 assertThat(textView.paint.typeface.systemFontFamilyName).isEqualTo("cursive") in getPaint_setTypeface_worksWith_setFontVariationSettings() 67 assertThat(textView.typeface!!.systemFontFamilyName) in getPaint_setTypeface_worksWith_setFontVariationSettings() 71 assertThat(textView.setFontVariationSettings("'wght' 200")).isTrue() in getPaint_setTypeface_worksWith_setFontVariationSettings() 73 assertThat(textView.paint.typeface.systemFontFamilyName).isEqualTo("cursive") in getPaint_setTypeface_worksWith_setFontVariationSettings() 74 assertThat(textView.typeface!!.systemFontFamilyName) in getPaint_setTypeface_worksWith_setFontVariationSettings()
|
| D | AppCompatTextViewAutoSizeTest.java | 84 final AppCompatTextView textView = (AppCompatTextView) mActivity in testAutoSizeWithMaxLines_shouldNotThrowException() local 86 assertTrue(textView instanceof CustomTextViewWithTransformationMethod); in testAutoSizeWithMaxLines_shouldNotThrowException() 87 assertEquals(1, textView.getMaxLines()); in testAutoSizeWithMaxLines_shouldNotThrowException() 88 assertEquals(TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM, textView.getAutoSizeTextType()); in testAutoSizeWithMaxLines_shouldNotThrowException() 89 assertTrue(textView.getTransformationMethod() instanceof SingleLineTransformationMethod); in testAutoSizeWithMaxLines_shouldNotThrowException() 94 final AppCompatTextView textView = (AppCompatTextView) mActivity in testSpacingIsSet() local 96 textView.setLineSpacing(5, 5); in testSpacingIsSet() 99 new AppCompatTextViewAutoSizeHelper(textView); in testSpacingIsSet() 105 assertEquals(textView.getLineSpacingMultiplier(), staticLayout.getSpacingMultiplier(), 0f); in testSpacingIsSet() 106 assertEquals(textView.getLineSpacingExtra(), staticLayout.getSpacingAdd(), 0f); in testSpacingIsSet()
|
| D | AppCompatAttributeTest.kt | 118 val textView = root.findViewById<TextView>(R.id.text_view) in testAppCompatTextViewAttributes() constant 119 assertTrue(textView.attributeSourceResourceMap.isNotEmpty()) in testAppCompatTextViewAttributes() 122 textView.attributeSourceResourceMap[R.attr.autoSizeTextType] in testAppCompatTextViewAttributes()
|
| /appcompat/appcompat/src/main/java/androidx/appcompat/widget/ |
| D | AppCompatTextHelper.java | 500 final TextView textView = textViewWeak.get(); 501 if (textView != null) { 502 if (textView.isAttachedToWindow()) { 504 textView.post(new Runnable() { 507 applyNewTypefacePreservingVariationSettings(textView, typeface, style); 511 applyNewTypefacePreservingVariationSettings(textView, typeface, mStyle); 517 private static void applyNewTypefacePreservingVariationSettings(TextView textView, 521 fontVariationSettings = Api26Impl.getFontVariationSettings(textView); 523 Api26Impl.setFontVariationSettings(textView, null); 527 textView.setTypeface(typeface, style); [all …]
|
| D | AppCompatTextViewAutoSizeHelper.java | 108 boolean isHorizontallyScrollable(TextView textView) { in isHorizontallyScrollable() argument 109 return invokeAndReturnWithDefault(textView, "getHorizontallyScrolling", false); in isHorizontallyScrollable() 112 void computeAndSetTextDirection(StaticLayout.Builder layoutBuilder, TextView textView) { in computeAndSetTextDirection() argument 122 TextView textView) { in computeAndSetTextDirection() argument 124 invokeAndReturnWithDefault(textView, "getTextDirectionHeuristic", in computeAndSetTextDirection() 135 boolean isHorizontallyScrollable(TextView textView) { in isHorizontallyScrollable() argument 136 return textView.isHorizontallyScrollable(); in isHorizontallyScrollable() 141 TextView textView) { in computeAndSetTextDirection() argument 142 layoutBuilder.setTextDirection(textView.getTextDirectionHeuristic()); in computeAndSetTextDirection() 146 AppCompatTextViewAutoSizeHelper(@NonNull TextView textView) { in AppCompatTextViewAutoSizeHelper() argument [all …]
|
| D | AppCompatTextClassifierHelper.java | 41 AppCompatTextClassifierHelper(@NonNull TextView textView) { in AppCompatTextClassifierHelper() argument 42 mTextView = Preconditions.checkNotNull(textView); in AppCompatTextClassifierHelper() 72 static @NonNull TextClassifier getTextClassifier(@NonNull TextView textView) { in getTextClassifier() argument 74 textView.getContext().getSystemService(TextClassificationManager.class); in getTextClassifier()
|
| D | ScrollingTabContainerView.java | 497 TextView textView = new AppCompatTextView(getContext(), null, in update() local 499 textView.setEllipsize(TruncateAt.END); in update() 503 textView.setLayoutParams(lp); in update() 504 addView(textView); in update() 505 mTextView = textView; in update()
|
| /appcompat/appcompat/src/androidTest/java/androidx/appcompat/testutils/ |
| D | TestUtilsActions.java | 84 TextView textView = (TextView) view; 85 textView.setTextAppearance(textView.getContext(), resId);
|
| /appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/ |
| D | AlertDialogTest.java | 1460 final TextView textView = (TextView) item; in matchesSafely() local 1461 final Typeface typeface = textView.getTypeface(); in matchesSafely()
|