Home
last modified time | relevance | path

Searched refs:textView (Results 1 – 25 of 139) sorted by relevance

123456

/frameworks/base/core/tests/coretests/src/android/widget/
DAutoCompleteTextViewPopup.java47 final AutoCompleteTextView textView = theActivity.getTextView(); in testPopupSetListSelection() local
51 textView.requestFocus(); in testPopupSetListSelection()
56 waitAssertListSelection(textView, ListView.INVALID_POSITION); in testPopupSetListSelection()
61 textView.setListSelection(0); in testPopupSetListSelection()
65 waitAssertListSelection("set selection to (0)", textView, 0); in testPopupSetListSelection()
69 waitAssertListSelection("move selection to (1)", textView, 1); in testPopupSetListSelection()
72 clearText(textView); in testPopupSetListSelection()
79 final AutoCompleteTextView textView = theActivity.getTextView(); in testPopupGetListSelection() local
83 textView.requestFocus(); in testPopupGetListSelection()
88 waitAssertListSelection(textView, ListView.INVALID_POSITION); in testPopupGetListSelection()
[all …]
DTextViewActivityTest.java302 final TextView textView = mActivity.findViewById(R.id.textview); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint() local
303 textView.setTextDirection(TextView.TEXT_DIRECTION_FIRST_STRONG_LTR); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
304 textView.setInputType(InputType.TYPE_CLASS_TEXT); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
305 textView.setSingleLine(true); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
306 textView.setHint("الروبوت"); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
330 final TextView textView = mActivity.findViewById(R.id.nonselectable_textview); in testToolbarAppearsAfterLinkClickedNonselectable() local
337 assertTrue(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable()
342 assertFalse(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable()
347 assertTrue(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable()
352 assertFalse(textView.hasSelection()); in testToolbarAppearsAfterLinkClickedNonselectable()
[all …]
DTextViewFallbackLineSpacingTest.java95 final TextView textView = new TextView(activity); in testFallbackLineSpacing() local
96 textView.setTypeface(setup.getTypefaceFor("sans-serif")); in testFallbackLineSpacing()
97 textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 100); in testFallbackLineSpacing()
99 textView.setText("aaaaa aabaa aaaaa", mBufferType); in testFallbackLineSpacing()
100 textView.setPadding(0, 0, 0, 0); in testFallbackLineSpacing()
101 textView.setIncludeFontPadding(false); in testFallbackLineSpacing()
102 textView.setFallbackLineSpacing(mEnabled); in testFallbackLineSpacing()
104 final int em = (int) Math.ceil(textView.getPaint().measureText("a")); in testFallbackLineSpacing()
107 textView.measure( in testFallbackLineSpacing()
110 textView.layout(0, 0, width, height); in testFallbackLineSpacing()
[all …]
DAutoCompleteTextViewCallbacks.java38 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupNoSelection() local
42 textView.requestFocus(); in testPopupNoSelection()
63 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupEnterSelection() local
67 textView.requestFocus(); in testPopupEnterSelection()
71 textView.post(new Runnable() { in testPopupEnterSelection()
89 textView.post(new Runnable() { in testPopupEnterSelection()
112 AutoCompleteTextView textView = theActivity.getTextView(); in testPopupLeaveSelection() local
116 textView.requestFocus(); in testPopupLeaveSelection()
125 textView.post(new Runnable() { in testPopupLeaveSelection()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DTextViewPrecomputedTextPerfTest.java107 final TextView textView = new TextView(getContext()); in testNewLayout_RandomText() local
108 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText()
109 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText()
110 textView.setText(text); in testNewLayout_RandomText()
114 textView.makeNewLayout(TEXT_WIDTH, TEXT_WIDTH, UNKNOWN_BORING, UNKNOWN_BORING, in testNewLayout_RandomText()
126 final TextView textView = new TextView(getContext()); in testNewLayout_RandomText_Selectable() local
127 textView.setTextIsSelectable(true); in testNewLayout_RandomText_Selectable()
128 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText_Selectable()
129 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText_Selectable()
130 textView.setText(text); in testNewLayout_RandomText_Selectable()
[all …]
DTextViewOnMeasurePerfTest.java111 final TextView textView = new TextView(context); in testMeasure_AtMost() local
112 textView.setText(COMPLEX_MULTILINE_TEXT); in testMeasure_AtMost()
116 textView.setTextLocale(Locale.UK); in testMeasure_AtMost()
117 textView.setTextLocale(Locale.US); in testMeasure_AtMost()
119 textView.measure(AT_MOST | VIEW_WIDTH, AT_MOST | VIEW_HEIGHT); in testMeasure_AtMost()
128 final TextView textView = new TextView(context); in testMeasure_Exactly() local
129 textView.setText(COMPLEX_MULTILINE_TEXT); in testMeasure_Exactly()
133 textView.setTextLocale(Locale.UK); in testMeasure_Exactly()
134 textView.setTextLocale(Locale.US); in testMeasure_Exactly()
136 textView.measure(EXACTLY | VIEW_WIDTH, EXACTLY | VIEW_HEIGHT); in testMeasure_Exactly()
[all …]
/frameworks/support/compat/src/main/java/androidx/core/widget/
DTextViewCompat.java107 private static int retrieveIntFromField(Field field, TextView textView) { in retrieveIntFromField() argument
109 return field.getInt(textView); in retrieveIntFromField()
131 public static void setCompoundDrawablesRelative(@NonNull TextView textView, in setCompoundDrawablesRelative() argument
135 textView.setCompoundDrawablesRelative(start, top, end, bottom); in setCompoundDrawablesRelative()
137 boolean rtl = textView.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; in setCompoundDrawablesRelative()
138 textView.setCompoundDrawables(rtl ? end : start, top, rtl ? start : end, bottom); in setCompoundDrawablesRelative()
140 textView.setCompoundDrawables(start, top, end, bottom); in setCompoundDrawablesRelative()
158 public static void setCompoundDrawablesRelativeWithIntrinsicBounds(@NonNull TextView textView, in setCompoundDrawablesRelativeWithIntrinsicBounds() argument
162 textView.setCompoundDrawablesRelativeWithIntrinsicBounds(start, top, end, bottom); in setCompoundDrawablesRelativeWithIntrinsicBounds()
164 boolean rtl = textView.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; in setCompoundDrawablesRelativeWithIntrinsicBounds()
[all …]
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/
DShadowOverlayContainerTest.java47 TextView textView = new TextView(mContext); in testWrapContent() local
48 textView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, in testWrapContent()
50 textView.setText("abc"); in testWrapContent()
53 container.wrap(textView); in testWrapContent()
58 assertTrue(textView.getWidth() > 0); in testWrapContent()
59 assertTrue(textView.getWidth() < 500); in testWrapContent()
60 assertTrue(textView.getHeight() > 0); in testWrapContent()
61 assertTrue(textView.getHeight() < 500); in testWrapContent()
62 assertEquals(container.getWidth(), textView.getWidth()); in testWrapContent()
63 assertEquals(container.getHeight(), textView.getHeight()); in testWrapContent()
[all …]
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/widget/
DAppCompatTextViewTest.java135 final AppCompatTextView textView = in testAppCompatAllCapsFalseOnButton() local
138 assertEquals("Text view is not in all caps", text, textView.getLayout().getText()); in testAppCompatAllCapsFalseOnButton()
143 final TextView textView = mContainer.findViewById(R.id.view_text_color_hex); in testTextColorSetHex() local
144 assertEquals(Color.RED, textView.getCurrentTextColor()); in testTextColorSetHex()
149 final TextView textView = mContainer.findViewById(R.id.view_text_color_csl); in testTextColorSetColorStateList() local
152 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_default), in testTextColorSetColorStateList()
153 textView.getCurrentTextColor()); in testTextColorSetColorStateList()
156 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_disabled), in testTextColorSetColorStateList()
157 textView.getCurrentTextColor()); in testTextColorSetColorStateList()
162 final TextView textView = mContainer.findViewById(R.id.view_text_color_primary); in testTextColorSetThemeAttrHex() local
[all …]
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/
DFindMethodTest.java32 TextView textView = mBinder.textView6; in testNoArg() local
33 assertEquals("no arg", textView.getText().toString()); in testNoArg()
37 TextView textView = mBinder.textView0; in testIntArg() local
38 assertEquals("1", textView.getText().toString()); in testIntArg()
42 TextView textView = mBinder.textView1; in testFloatArg() local
43 assertEquals("1.25", textView.getText().toString()); in testFloatArg()
47 TextView textView = mBinder.textView2; in testStringArg() local
48 assertEquals("hello", textView.getText().toString()); in testStringArg()
52 TextView textView = mBinder.textView3; in testBoxedArg() local
53 assertEquals("1", textView.getText().toString()); in testBoxedArg()
[all …]
DNewApiTest.java43 assertEquals("foo", mBinder.textView.getText().toString()); in testSetElevation()
44 assertEquals(3f, mBinder.textView.getElevation()); in testSetElevation()
52 TextView textView = mBinder.textView; in testSetElevationOlderAPI() local
53 float originalElevation = textView.getElevation(); in testSetElevationOlderAPI()
57 assertEquals("foo2", textView.getText().toString()); in testSetElevationOlderAPI()
58 assertEquals(originalElevation, textView.getElevation()); in testSetElevationOlderAPI()
71 assertSame(mBinder.textView, views.get(0)); in testGeneric()
DInnerCannotReadDependencyTest.java37 assertEquals("a ", mBinder.textView.getText().toString()); in testBinding()
40 assertEquals("null ", mBinder.textView.getText().toString()); in testBinding()
43 assertEquals("null b", mBinder.textView.getText().toString()); in testBinding()
46 assertEquals("c b", mBinder.textView.getText().toString()); in testBinding()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/
DRichTextViewTest.java64 RichTextView textView = new RichTextView(application); in testLinkAnnotation() local
65 textView.setText(ssb); in testLinkAnnotation()
67 final CharSequence text = textView.getText(); in testLinkAnnotation()
70 assertThat(textView.getMovementMethod()).isInstanceOf(TouchableLinkMovementMethod.class); in testLinkAnnotation()
88 RichTextView textView = new RichTextView(application); in testOnLinkClickListener() local
89 textView.setText(ssb); in testOnLinkClickListener()
92 textView.setOnLinkClickListener(listener); in testOnLinkClickListener()
94 assertSame(listener, textView.getOnLinkClickListener()); in testOnLinkClickListener()
96 CharSequence text = textView.getText(); in testOnLinkClickListener()
98 spans[0].onClick(textView); in testOnLinkClickListener()
[all …]
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/
DEnvReverbTest.java72 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()
114 textView = (TextView)findViewById(R.id.rvbParam1Value); in onCreate()
115 mParameters[0] = new RoomLevelParam(mReverb, seekBar, textView); in onCreate()
120 textView = (TextView)findViewById(R.id.rvbParam2Value); in onCreate()
121 mParameters[1] = new RoomHFLevelParam(mReverb, seekBar, textView); in onCreate()
126 textView = (TextView)findViewById(R.id.rvbParam3Value); in onCreate()
127 mParameters[2] = new DecayTimeParam(mReverb, seekBar, textView); in onCreate()
[all …]
DEqualizerTest.java71 TextView textView; in onCreate() local
100 textView = (TextView)findViewById(R.id.eqParam1Value); in onCreate()
101 …rs[0] = new BandLevelParam(mEqualizer, 0, bandLevelRange[0], bandLevelRange[1], seekBar, textView); in onCreate()
111 textView = (TextView)findViewById(R.id.eqParam2Value); in onCreate()
112 …rs[1] = new BandLevelParam(mEqualizer, 1, bandLevelRange[0], bandLevelRange[1], seekBar, textView); in onCreate()
122 textView = (TextView)findViewById(R.id.eqParam3Value); in onCreate()
123 …rs[2] = new BandLevelParam(mEqualizer, 2, bandLevelRange[0], bandLevelRange[1], seekBar, textView); in onCreate()
133 textView = (TextView)findViewById(R.id.eqParam4Value); in onCreate()
134 …rs[3] = new BandLevelParam(mEqualizer, 3, bandLevelRange[0], bandLevelRange[1], seekBar, textView); in onCreate()
144 textView = (TextView)findViewById(R.id.eqParam5Value); in onCreate()
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/span/
DLinkSpanTest.java42 final TextView textView = new TextView(context); in onClick_shouldCallListenerOnContext() local
45 linkSpan.onClick(textView); in onClick_shouldCallListenerOnContext()
52 final TextView textView = new TextView(application); in onClick_contextDoesNotImplementOnClickListener_shouldBeNoOp() local
55 linkSpan.onClick(textView); in onClick_contextDoesNotImplementOnClickListener_shouldBeNoOp()
65 final TextView textView = new TextView(wrapperContext); in onClick_contextWrapsOnClickListener_shouldCallWrappedListener() local
69 linkSpan.onClick(textView); in onClick_contextWrapsOnClickListener_shouldCallWrappedListener()
76 final TextView textView = new TextView(context); in onClick_shouldClearSelection() local
77 textView.setMovementMethod(LinkMovementMethod.getInstance()); in onClick_shouldClearSelection()
78 textView.setFocusable(true); in onClick_shouldClearSelection()
79 textView.setFocusableInTouchMode(true); in onClick_shouldClearSelection()
[all …]
/frameworks/support/compat/src/androidTest/java/android/support/v4/testutils/
DTextViewActions.java55 TextView textView = (TextView) view; in setMaxLines() local
56 textView.setMaxLines(maxLines); in setMaxLines()
82 TextView textView = (TextView) view;
83 textView.setMinLines(minLines);
109 TextView textView = (TextView) view;
110 textView.setText(stringResId);
136 TextView textView = (TextView) view;
137 TextViewCompat.setTextAppearance(textView, styleResId);
165 TextView textView = (TextView) view;
166 TextViewCompat.setCompoundDrawablesRelative(textView, start, top, end, bottom);
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/text/
DTextViewSetTextMeasurePerfTest.java94 final TextView textView = new TextView(InstrumentationRegistry.getTargetContext()); in timeCreate() local
95 textView.setText(text); in timeCreate()
100 textView.setTextLocale(Locale.UK); in timeCreate()
101 textView.setTextLocale(Locale.US); in timeCreate()
105 textView.setText(text); in timeCreate()
106 textView.measure(AT_MOST | mLineWidth, UNSPECIFIED); in timeCreate()
121 final TextView textView = new TextView(InstrumentationRegistry.getTargetContext()); in timeDraw() local
122 textView.setText(text); in timeDraw()
130 textView.setTextLocale(Locale.UK); in timeDraw()
131 textView.setTextLocale(Locale.US); in timeDraw()
[all …]
/frameworks/support/emoji/core/src/main/java/androidx/emoji/widget/
DEmojiInputFilter.java49 EmojiInputFilter(@NonNull final TextView textView) { in EmojiInputFilter() argument
50 mTextView = textView; in EmojiInputFilter()
102 InitCallbackImpl(TextView textView) { in InitCallbackImpl() argument
103 mViewRef = new WeakReference<>(textView); in InitCallbackImpl()
109 final TextView textView = mViewRef.get(); in onInitialized() local
110 if (textView != null && textView.isAttachedToWindow()) { in onInitialized()
111 final CharSequence result = EmojiCompat.get().process(textView.getText()); in onInitialized()
116 textView.setText(result); in onInitialized()
DEmojiTextViewHelper.java72 public EmojiTextViewHelper(@NonNull TextView textView) { in EmojiTextViewHelper() argument
73 Preconditions.checkNotNull(textView, "textView cannot be null"); in EmojiTextViewHelper()
74 mHelper = Build.VERSION.SDK_INT >= 19 ? new HelperInternal19(textView) in EmojiTextViewHelper()
151 HelperInternal19(TextView textView) { in HelperInternal19() argument
152 mTextView = textView; in HelperInternal19()
153 mEmojiInputFilter = new EmojiInputFilter(textView); in HelperInternal19()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DTextViewActions.java329 public static ViewAction dragHandle(TextView textView, Handle handleType, int endIndex) { in dragHandle() argument
330 return dragHandle(textView, handleType, endIndex, true); in dragHandle()
348 public static ViewAction dragHandle(TextView textView, Handle handleType, int endIndex, in dragHandle() argument
353 new CurrentHandleCoordinates(textView), in dragHandle()
354 new HandleCoordinates(textView, handleType, endIndex, primary), in dragHandle()
368 public CurrentHandleCoordinates(TextView textView) { in CurrentHandleCoordinates() argument
369 mTextView = textView; in CurrentHandleCoordinates()
423 public HandleCoordinates(TextView textView, Handle handleType, int index, boolean primary) { in HandleCoordinates() argument
424 mTextView = textView; in HandleCoordinates()
539 private float[] locateTextAtIndex(TextView textView, int index, boolean primary) { in locateTextAtIndex() argument
[all …]
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/app/
DToolbarFragmentPagerMenu.java107 TextView textView = new TextView(container.getContext()); in onCreateView() local
109 textView.setText(getClass().getSimpleName()); in onCreateView()
110 textView.setGravity(Gravity.CENTER); in onCreateView()
111 textView.setLayoutParams(new ViewGroup.LayoutParams( in onCreateView()
114 return textView; in onCreateView()
149 TextView textView = new TextView(container.getContext()); in onCreateView() local
151 textView.setText(getClass().getSimpleName()); in onCreateView()
152 textView.setGravity(Gravity.CENTER); in onCreateView()
153 textView.setLayoutParams(new ViewGroup.LayoutParams( in onCreateView()
156 return textView; in onCreateView()
/frameworks/support/coordinatorlayout/src/androidTest/java/androidx/coordinatorlayout/widget/
DCoordinatorSnackbarWithButtonTest.java127 final TextView textView = mCoordinatorLayout.findViewById(R.id.text); in testBehaviorBasedSlidingFromLayoutAttribute() local
128 verifyBarViewStacking(textView, 0); in testBehaviorBasedSlidingFromLayoutAttribute()
141 final TextView textView = mCoordinatorLayout.findViewById(R.id.text); in testBehaviorBasedSlidingFromClassAnnotation() local
142 verifyBarViewStacking(textView, 0); in testBehaviorBasedSlidingFromClassAnnotation()
155 final TextView textView = mCoordinatorLayout.findViewById(R.id.text); in testBehaviorBasedSlidingFromClassInterface() local
156 verifyBarViewStacking(textView, 0); in testBehaviorBasedSlidingFromClassInterface()
166 final TextView textView = mCoordinatorLayout.findViewById(R.id.text); in testBehaviorBasedSlidingFromRuntimeApiCall() local
168 (CoordinatorLayout.LayoutParams) textView.getLayoutParams(); in testBehaviorBasedSlidingFromRuntimeApiCall()
174 verifyBarViewStacking(textView, 0); in testBehaviorBasedSlidingFromRuntimeApiCall()
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/widget/
DAnimatedRecyclerView.java130 vh.textView.animate().translationX(0f).alpha(1f) in createAnimator()
140 vh.textView.setTranslationX(0f); in createAnimator()
141 vh.textView.setAlpha(1f); in createAnimator()
160 info.text = ((MyViewHolder) viewHolder).textView.getText(); in createAnimator()
168 info.text = ((MyViewHolder) viewHolder).textView.getText(); in createAnimator()
228 * (vh.textView.getTranslationX() / vh.textView.getWidth())); in createAnimator()
231 vh.textView.setText(finalText); in createAnimator()
234 vh.textView.setText(pre.text); in createAnimator()
270 mStartRatio = mViewHolder.textView.getTranslationX() / mMaxX; in ItemChangeAnimator()
282 mViewHolder.textView.setTranslationX(fraction * mMaxX); in setFraction()
[all …]
/frameworks/base/tests/HierarchyViewerTest/src/com/android/test/hierarchyviewer/
DMainActivity.java19 View textView = findViewById(R.id.textView); in onCreate() local
20 Log.d(TAG, "x, y = " + textView.getX() + ", " + textView.getY()); in onCreate()

123456