Home
last modified time | relevance | path

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

123456

/frameworks/support/compat/java/android/support/v4/widget/
DTextViewCompat.java78 public void setCompoundDrawablesRelative(@NonNull TextView textView, in setCompoundDrawablesRelative() argument
81 textView.setCompoundDrawables(start, top, end, bottom); in setCompoundDrawablesRelative()
84 public void setCompoundDrawablesRelativeWithIntrinsicBounds(@NonNull TextView textView, in setCompoundDrawablesRelativeWithIntrinsicBounds() argument
87 textView.setCompoundDrawablesWithIntrinsicBounds(start, top, end, bottom); in setCompoundDrawablesRelativeWithIntrinsicBounds()
90 public void setCompoundDrawablesRelativeWithIntrinsicBounds(@NonNull TextView textView, in setCompoundDrawablesRelativeWithIntrinsicBounds() argument
93 textView.setCompoundDrawablesWithIntrinsicBounds(start, top, end, bottom); in setCompoundDrawablesRelativeWithIntrinsicBounds()
107 private static int retrieveIntFromField(Field field, TextView textView) { in retrieveIntFromField() argument
109 return field.getInt(textView); in retrieveIntFromField()
116 public int getMaxLines(TextView textView) { in getMaxLines() argument
121 if (sMaxModeField != null && retrieveIntFromField(sMaxModeField, textView) == LINES) { in getMaxLines()
[all …]
/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.java263 final TextView textView = (TextView) getActivity().findViewById(R.id.textview); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint() local
264 textView.post(new Runnable() { in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
267 textView.setTextDirection(TextView.TEXT_DIRECTION_FIRST_STRONG_LTR); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
268 textView.setInputType(InputType.TYPE_CLASS_TEXT); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
269 textView.setSingleLine(true); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
270 textView.setHint("الروبوت"); in testToolbarAppearsAfterSelection_withFirstStringLtrAlgorithmAndRtlHint()
318 final TextView textView = (TextView) getActivity().findViewById(R.id.textview); in testToolbarAndSelectionHandle() local
320 .perform(dragHandle(textView, Handle.SELECTION_START, text.indexOf('a'))); in testToolbarAndSelectionHandle()
325 .perform(dragHandle(textView, Handle.SELECTION_END, text.length())); in testToolbarAndSelectionHandle()
344 final TextView textView = (TextView) getActivity().findViewById(R.id.textview); in testInsertionHandle() local
[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/support/v17/leanback/tests/java/android/support/v17/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/tests/src/android/support/v7/widget/
DAppCompatTextViewTest.java84 final AppCompatTextView textView = in testAppCompatAllCapsFalseOnButton() local
87 assertEquals("Text view is not in all caps", text, textView.getLayout().getText()); in testAppCompatAllCapsFalseOnButton()
92 final TextView textView = mContainer.findViewById(R.id.view_text_color_hex); in testTextColorSetHex() local
93 assertEquals(Color.RED, textView.getCurrentTextColor()); in testTextColorSetHex()
98 final TextView textView = mContainer.findViewById(R.id.view_text_color_csl); in testTextColorSetColorStateList() local
101 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_default), in testTextColorSetColorStateList()
102 textView.getCurrentTextColor()); in testTextColorSetColorStateList()
105 assertEquals(ContextCompat.getColor(textView.getContext(), R.color.ocean_disabled), in testTextColorSetColorStateList()
106 textView.getCurrentTextColor()); in testTextColorSetColorStateList()
111 final TextView textView = mContainer.findViewById(R.id.view_text_color_primary); in testTextColorSetThemeAttrHex() local
[all …]
DAppCompatTextViewAutoSizeTest.java510 final AppCompatTextView textView = (AppCompatTextView) getActivity().findViewById(
512 final int initialAutoSizeType = textView.getAutoSizeTextType();
513 final int initialMinTextSize = textView.getAutoSizeMinTextSize();
514 final int initialMaxTextSize = textView.getAutoSizeMaxTextSize();
515 final int initialAutoSizeGranularity = textView.getAutoSizeStepGranularity();
516 final int initialSizes = textView.getAutoSizeTextAvailableSizes().length;
518 Assert.assertEquals(null, textView.getEllipsize());
531 textView.setEllipsize(newEllipsizeValue);
535 Assert.assertEquals(newEllipsizeValue, textView.getEllipsize());
537 Assert.assertEquals(initialAutoSizeType, textView.getAutoSizeTextType());
[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/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/eclair-mr1/test/instrumentation/src/com/android/setupwizardlib/test/
DRichTextViewTest.java50 RichTextView textView = new RichTextView(InstrumentationRegistry.getContext()); in testLinkAnnotation() local
51 textView.setText(ssb); in testLinkAnnotation()
53 final CharSequence text = textView.getText(); in testLinkAnnotation()
72 RichTextView textView = new RichTextView(InstrumentationRegistry.getContext()); in testTextStyle() local
73 textView.setText(ssb); in testTextStyle()
75 final CharSequence text = textView.getText(); in testTextStyle()
103 RichTextView textView = new RichTextView(InstrumentationRegistry.getContext()); in testTextContainingNoLinksAreNotFocusable() local
104 textView.setText("Thou shall not be focusable!"); in testTextContainingNoLinksAreNotFocusable()
107 textView.isFocusable()); in testTextContainingNoLinksAreNotFocusable()
116 RichTextView textView = new RichTextView(InstrumentationRegistry.getContext()); in testRichTxtViewFocusChangesWithTextChange() local
[all …]
/frameworks/support/compat/tests/java/android/support/v4/testutils/
DTextViewActions.java53 TextView textView = (TextView) view; in setMaxLines() local
54 textView.setMaxLines(maxLines); in setMaxLines()
80 TextView textView = (TextView) view;
81 textView.setMinLines(minLines);
107 TextView textView = (TextView) view;
108 textView.setText(stringResId);
134 TextView textView = (TextView) view;
135 TextViewCompat.setTextAppearance(textView, styleResId);
163 TextView textView = (TextView) view;
164 TextViewCompat.setCompoundDrawablesRelative(textView, start, top, end, bottom);
[all …]
/frameworks/base/core/java/android/widget/
DSelectionActionModeHelper.java63 final TextView textView = mEditor.getTextView(); in SelectionActionModeHelper() local
65 textView.getTextClassifier(), textView.getText(), 0, 1, textView.getTextLocales()); in SelectionActionModeHelper()
66 mSelectionTracker = new SelectionTracker(textView.getTextClassifier()); in SelectionActionModeHelper()
140 final TextView textView = mEditor.getTextView(); in hasSelection() local
141 return textView.getSelectionEnd() > textView.getSelectionStart(); in hasSelection()
145 final TextView textView = mEditor.getTextView(); in startActionMode() local
146 final CharSequence text = textView.getText(); in startActionMode()
148 textView.getSelectionStart(), textView.getSelectionEnd()); in startActionMode()
175 final TextView textView = mEditor.getTextView(); in invalidateActionMode() local
177 textView.getSelectionStart(), textView.getSelectionEnd(), in invalidateActionMode()
[all …]
/frameworks/support/emoji/core/src/android/support/text/emoji/widget/
DEmojiInputFilter.java48 EmojiInputFilter(@NonNull final TextView textView) { in EmojiInputFilter() argument
49 mTextView = textView; in EmojiInputFilter()
98 InitCallbackImpl(TextView textView) { in InitCallbackImpl() argument
99 mViewRef = new WeakReference<>(textView); in InitCallbackImpl()
105 final TextView textView = mViewRef.get(); in onInitialized() local
106 if (textView != null && textView.isAttachedToWindow()) { in onInitialized()
107 final CharSequence result = EmojiCompat.get().process(textView.getText()); in onInitialized()
112 textView.setText(result); in onInitialized()
DEmojiTextViewHelper.java71 public EmojiTextViewHelper(@NonNull TextView textView) { in EmojiTextViewHelper() argument
72 Preconditions.checkNotNull(textView, "textView cannot be null"); in EmojiTextViewHelper()
73 mHelper = Build.VERSION.SDK_INT >= 19 ? new HelperInternal19(textView) in EmojiTextViewHelper()
150 HelperInternal19(TextView textView) { in HelperInternal19() argument
151 mTextView = textView; in HelperInternal19()
152 mEmojiInputFilter = new EmojiInputFilter(textView); in HelperInternal19()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DTextViewActions.java313 public static ViewAction dragHandle(TextView textView, Handle handleType, int endIndex) { in dragHandle() argument
314 return dragHandle(textView, handleType, endIndex, true); in dragHandle()
332 public static ViewAction dragHandle(TextView textView, Handle handleType, int endIndex, in dragHandle() argument
337 new CurrentHandleCoordinates(textView), in dragHandle()
338 new HandleCoordinates(textView, handleType, endIndex, primary), in dragHandle()
352 public CurrentHandleCoordinates(TextView textView) { in CurrentHandleCoordinates() argument
353 mTextView = textView; in CurrentHandleCoordinates()
407 public HandleCoordinates(TextView textView, Handle handleType, int index, boolean primary) { in HandleCoordinates() argument
408 mTextView = textView; in HandleCoordinates()
523 private float[] locateTextAtIndex(TextView textView, int index, boolean primary) { in locateTextAtIndex() argument
[all …]
DTextViewAssertions.java107 TextView textView = (TextView) view; in hasInsertionPointerAtIndex()
108 int selectionStart = textView.getSelectionStart(); in hasInsertionPointerAtIndex()
109 int selectionEnd = textView.getSelectionEnd(); in hasInsertionPointerAtIndex()
165 TextView textView = (TextView) view;
166 int selectionStart = textView.getSelectionStart();
167 int selectionEnd = textView.getSelectionEnd();
169 String selectedText = textView.getText()
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/app/
DToolbarFragmentPagerMenu.java106 TextView textView = new TextView(container.getContext()); in onCreateView() local
108 textView.setText(getClass().getSimpleName()); in onCreateView()
109 textView.setGravity(Gravity.CENTER); in onCreateView()
110 textView.setLayoutParams(new ViewGroup.LayoutParams( in onCreateView()
113 return textView; in onCreateView()
148 TextView textView = new TextView(container.getContext()); in onCreateView() local
150 textView.setText(getClass().getSimpleName()); in onCreateView()
151 textView.setGravity(Gravity.CENTER); in onCreateView()
152 textView.setLayoutParams(new ViewGroup.LayoutParams( in onCreateView()
155 return textView; in onCreateView()
/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()
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/widget/
DAnimatedRecyclerView.java131 vh.textView.animate().translationX(0f).alpha(1f) in createAnimator()
141 vh.textView.setTranslationX(0f); in createAnimator()
142 vh.textView.setAlpha(1f); in createAnimator()
161 info.text = ((MyViewHolder) viewHolder).textView.getText(); in createAnimator()
169 info.text = ((MyViewHolder) viewHolder).textView.getText(); in createAnimator()
231 * (vh.textView.getTranslationX() / vh.textView.getWidth())); in createAnimator()
234 vh.textView.setText(finalText); in createAnimator()
237 vh.textView.setText(pre.text); in createAnimator()
275 mStartRatio = mViewHolder.textView.getTranslationX() / mMaxX; in ItemChangeAnimator()
287 mViewHolder.textView.setTranslationX(fraction * mMaxX); in setFraction()
[all …]
/frameworks/support/samples/SupportLeanbackDemos/src/com/example/android/leanback/
DHorizontalGridTestActivity.java133 TextView textView = new TextView(parent.getContext()); in onCreateViewHolder() local
134 textView.setTextColor(Color.BLACK); in onCreateViewHolder()
135 textView.setFocusable(true); in onCreateViewHolder()
136 textView.setFocusableInTouchMode(true); in onCreateViewHolder()
137 textView.setOnFocusChangeListener(mItemFocusChangeListener); in onCreateViewHolder()
138 textView.setOnClickListener(mItemClickListener); in onCreateViewHolder()
139 return new ViewHolder(textView); in onCreateViewHolder()
/frameworks/base/core/tests/coretests/src/android/view/
DRunQueue.java39 TextView textView = new TextView(this); in onCreate() local
40 textView.setText("RunQueue"); in onCreate()
41 textView.setId(R.id.simple_view); in onCreate()
43 setContentView(textView); in onCreate()
/frameworks/base/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/java/com/android/layoutlib/test/myapplication/
DArraysCheckWidget.java52 TextView textView = new TextView(context); in addTextView() local
53 textView.setText(string); in addTextView()
54 textView.setTextSize(30); in addTextView()
55 addView(textView); in addTextView()

123456