Home | History | Annotate | Download | only in widget

Lines Matching defs:TextView

211  *    <TextView
228 * final TextView helloTextView = (TextView) findViewById(R.id.text_view_id);
234 * To customize the appearance of TextView, see <a href="https://developer.android.com/guide/topics/ui/themes.html">Styles and Themes</a>.
239 * See {@link android.R.styleable#TextView TextView Attributes},
322 public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
323 static final String LOG_TAG = "TextView";
382 // New state used to change background based on whether this TextView is multiline.
557 public void setErrorDrawable(Drawable dr, TextView tv) {
736 // they are defined by the TextView's style and are theme-dependent.
767 * The TextView does not auto-size text (default).
772 * The TextView scales text size both horizontally and vertically to fit within the
857 boolean onEditorAction(TextView v, int actionId, KeyEvent event);
860 public TextView(Context context) {
864 public TextView(Context context, @Nullable AttributeSet attrs) {
868 public TextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
873 public TextView(
877 // TextView is important by default, unless app developer overrode attribute.
909 * almost every TextView has one and it greatly simplifies the logic
954 attrs, com.android.internal.R.styleable.TextView, defStyleAttr, defStyleRes);
1633 * {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
1634 * {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
1781 * {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
1782 * {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
2089 // Hide the soft input if the currently active TextView is disabled
2160 * Return the text that TextView is displaying. If {@link #setText(CharSequence)} was called
2161 * with an argument of {@link android.widget.TextView.BufferType#SPANNABLE BufferType.SPANNABLE}
2162 * or {@link android.widget.TextView.BufferType#EDITABLE BufferType.EDITABLE}, you can cast
2177 * Returns the length, in characters, of the text managed by this TextView
2178 * @return The length of the text managed by the TextView in characters.
2185 * Return the text that TextView is displaying as an Editable object. If the text is not
2224 * with this TextView. By default there is no associated UndoManager, so null
2225 * is returned. One can be associated with the TextView through
2245 * Associate an {@link android.content.UndoManager} with this TextView. Once
2246 * done, all edit operations on the TextView will result in appropriate
2251 * this TextView, or null to clear any existing association.
2252 * @param tag String tag identifying this particular TextView owner in the
2268 * Gets the current {@link KeyListener} for the TextView.
2270 * @return the current key listener for this TextView.
2284 * Sets the key listener to be used with this TextView. This can be null
2292 * Be warned that if you want a TextView with a key listener or movement
2293 * method not to be focusable, or if you want a TextView without a
2347 * Gets the {@link android.text.method.MovementMethod} being used for this TextView,
2350 * @return the movement method being used for this TextView.
2359 * for this TextView. This can be null to disallow using the arrow keys to move the
2362 * Be warned that if you want a TextView with a key listener or movement
2363 * method not to be focusable, or if you want a TextView without a
2397 * Gets the current {@link android.text.method.TransformationMethod} for the TextView.
2399 * @return the current transformation method for this TextView.
2410 * TextView is displaying.
3281 * Updates the top padding of the TextView so that {@code firstBaselineToTopHeight} is
3282 * equal to the distance between the firt text baseline and the top of this TextView.
3316 * Updates the bottom padding of the TextView so that {@code lastBaselineToBottomHeight} is
3317 * equal to the distance between the last text baseline and the bottom of this TextView.
3352 * Returns the distance between the first text baseline and the top of this TextView.
3362 * Returns the distance between the last text baseline and the bottom of this TextView.
3470 // Maps styleable attributes that exist both in TextView style and TextAppearance.
3670 * Get the default primary {@link Locale} of the text in this TextView. This will always be
3672 * @return the default primary {@link Locale} of the text in this TextView.
3680 * Get the default {@link LocaleList} of the text in this TextView.
3681 * @return the default {@link LocaleList} of the text in this TextView.
3724 * Set the default {@link Locale} of the text in this TextView to a one-member
3742 * Set the default {@link LocaleList} of the text in this TextView to the given value.
3776 * @return the size (in pixels) of the default text size in this TextView.
3784 * @return the size (in scaled pixels) of the default text size in this TextView.
3809 * <p>Note: if this TextView has the auto-size feature enabled than this function is no-op.
3824 * <p>Note: if this TextView has the auto-size feature enabled than this function is no-op.
3935 * Set the TextView's elegant height metrics flag. This setting selects font
3995 * Get the value of the TextView's elegant height metrics flag. This setting selects font
4074 * TextView is {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}, and the default value for
4104 * The default value for both TextView and {@link EditText} is
4148 * Update the TextView parameters to be compatible with {@link PrecomputedText.Params}.
4231 * TextView textView = (TextView) findViewById(R.id.textView);
4232 * textView.setFontVariationSettings("'wdth' 150");
4240 * TextView textView = (TextView) findViewById(R.id.textView);
4241 * textView.setFontVariationSettings("'slnt' 20, 'ital' 1");
4251 * TextView. This function also returns true for empty settings string. Otherwise
4317 * Gets the text colors for the different states (normal, selected, focused) of the TextView.
4365 * TextView gets focused. The default is true.
4375 * TextView gets focused. The default is true.
4526 * TextView.
4556 * @return the color of the hint text, for the different states of this TextView.
4610 * this TextView
4624 * in the TextView beyond what is required for the text itself.
4661 * Returns the horizontal and vertical alignment of this TextView.
4727 * Sets the height of the TextView to be at least {@code minLines} tall.
4729 * This value is used for height calculation if LayoutParams does not force TextView to have an
4734 * @param minLines the minimum height of TextView in terms of number of lines
4751 * Returns the minimum height of TextView in terms of number of lines or -1 if the minimum
4754 * @return the minimum height of TextView in terms of number of lines or -1 if the minimum
4767 * Sets the height of the TextView to be at least {@code minPixels} tall.
4769 * This value is used for height calculation if LayoutParams does not force TextView to have an
4777 * @param minPixels the minimum height of TextView in terms of pixels
4794 * Returns the minimum height of TextView in terms of pixels or -1 if the minimum height was
4797 * @return the minimum height of TextView in terms of pixels or -1 if the minimum height is not
4810 * Sets the height of the TextView to be at most {@code maxLines} tall.
4812 * This value is used for height calculation if LayoutParams does not force TextView to have an
4816 * @param maxLines the maximum height of TextView in terms of number of lines
4833 * Returns the maximum height of TextView in terms of number of lines or -1 if the
4836 * @return the maximum height of TextView in terms of number of lines. -1 if the maximum height
4849 * Sets the height of the TextView to be at most {@code maxPixels} tall.
4851 * This value is used for height calculation if LayoutParams does not force TextView to have an
4855 * @param maxPixels the maximum height of TextView in terms of pixels
4872 * Returns the maximum height of TextView in terms of pixels or -1 if the maximum height was
4875 * @return the maximum height of TextView in terms of pixels or -1 if the maximum height
4888 * Sets the height of the TextView to be exactly {@code lines} tall.
4890 * This value is used for height calculation if LayoutParams does not force TextView to have an
4895 * @param lines the exact height of the TextView in terms of lines
4911 * Sets the height of the TextView to be exactly <code>pixels</code> tall.
4913 * This value is used for height calculation if LayoutParams does not force TextView to have an
4917 * @param pixels the exact height of the TextView in terms of pixels
4933 * Sets the width of the TextView to be at least {@code minEms} wide.
4935 * This value is used for width calculation if LayoutParams does not force TextView to have an
4939 * @param minEms the minimum width of TextView in terms of ems
4956 * Returns the minimum width of TextView in terms of ems or -1 if the minimum width was set
4959 * @return the minimum width of TextView in terms of ems. -1 if the minimum width is not
4972 * Sets the width of the TextView to be at least {@code minPixels} wide.
4974 * This value is used for width calculation if LayoutParams does not force TextView to have an
4982 * @param minPixels the minimum width of TextView in terms of pixels
4999 * Returns the minimum width of TextView in terms of pixels or -1 if the minimum width was set
5002 * @return the minimum width of TextView in terms of pixels or -1 if the minimum width is not
5015 * Sets the width of the TextView to be at most {@code maxEms} wide.
5017 * This value is used for width calculation if LayoutParams does not force TextView to have an
5021 * @param maxEms the maximum width of TextView in terms of ems
5038 * Returns the maximum width of TextView in terms of ems or -1 if the maximum width was set
5041 * @return the maximum width of TextView in terms of ems or -1 if the maximum width is not
5054 * Sets the width of the TextView to be at most {@code maxPixels} wide.
5056 * This value is used for width calculation if LayoutParams does not force TextView to have an
5060 * @param maxPixels the maximum width of TextView in terms of pixels
5077 * Returns the maximum width of TextView in terms of pixels or -1 if the maximum width was set
5080 * @return the maximum width of TextView in terms of pixels. -1 if the maximum width is not
5093 * Sets the width of the TextView to be exactly {@code ems} wide.
5095 * This value is used for width calculation if LayoutParams does not force TextView to have an
5099 * @param ems the exact width of the TextView in terms of ems
5115 * Sets the width of the TextView to be exactly {@code pixels} wide.
5117 * This value is used for width calculation if LayoutParams does not force TextView to have an
5121 * @param pixels the exact width of the TextView in terms of pixels
5137 * Sets line spacing for this TextView. Each line other than the last line will have its height
5178 * @return the extra space that is added to the height of each lines of this TextView.
5190 * Sets an explicit line height for this TextView. This is equivalent to the vertical distance
5191 * between subsequent baselines in the TextView.
5212 * Convenience method to append the specified text to the TextView's
5213 * display buffer, upgrading it to {@link android.widget.TextView.BufferType#EDITABLE}
5223 * Convenience method to append the specified text slice to the TextView's
5224 * display buffer, upgrading it to {@link android.widget.TextView.BufferType#EDITABLE}
5481 * @see android.widget.TextView.BufferType#EDITABLE
5494 * @see android.widget.TextView.BufferType#SPANNABLE
5502 * Sets the text to be displayed. TextView <em>does not</em> accept
5510 * When required, TextView will use {@link android.text.Spannable.Factory} to create final or
5516 * PrecomputedText mismatches with this TextView, IllegalArgumentException is thrown. To ensure
5517 * the parameters match, you can call {@link TextView#setTextMetricsParams} before calling this.
5524 * with this TextView.
5536 * When required, TextView will use {@link android.text.Spannable.Factory} to create final or
5551 * Sets the text to be displayed and the {@link android.widget.TextView.BufferType}.
5553 * When required, TextView will use {@link android.text.Spannable.Factory} to create final or
5559 * @param type a {@link android.widget.TextView.BufferType} which defines whether the text is
5563 * @see android.widget.TextView.BufferType
5645 "PrecomputedText's Parameters don't match the parameters of this TextView."
5647 + "to override the settings of this TextView: "
5649 + "TextView: " + getTextMetricsParams());
5749 * Sets the TextView to display the specified slice of the specified
5752 * since the TextView has no way to know that the text
5788 * Sets the text to be displayed and the {@link android.widget.TextView.BufferType} but retains
5790 * {@link #setText(CharSequence, android.widget.TextView.BufferType)} except that the cursor
5793 * When required, TextView will use {@link android.text.Spannable.Factory} to create final or
5799 * @param type a {@link android.widget.TextView.BufferType} which defines whether the text is
5802 * @see #setText(CharSequence, android.widget.TextView.BufferType)
5838 * {@link android.widget.TextView.BufferType}.
5840 * When required, TextView will use {@link android.text.Spannable.Factory} to create final or
5846 * @param type a {@link android.widget.TextView.BufferType} which defines whether the text is
5851 * @see android.widget.TextView.BufferType
5865 * Sets the text to be displayed when the text of the TextView is empty.
5898 * Sets the text to be displayed when the text of the TextView is empty,
5909 * Returns the hint that is displayed when the text of the TextView
6441 * Sets the right-hand compound drawable of the TextView to the "error"
6443 * the TextView has focus. The icon and error message will be reset to
6444 * null when any key events cause changes to the TextView's text. If the
6462 * Sets the right-hand compound drawable of the TextView to the specified
6464 * the TextView has focus. The icon and error message will be reset to
6465 * null when any key events cause changes to the TextView's text. The
6883 final TextView.Drawables drawables = mDrawables;
6942 * to allow users to select and copy text in a non-editable TextView, the content of an
6946 * @return True if the text displayed in this TextView can be selected by the user.
6958 * When you use a TextView to display a useful piece of information to the user (such as a
6976 * @param selectable Whether the content of this TextView should be selectable.
7011 // Disable pressed state, which was introduced when TextView was made clickable.
7900 * If this TextView contains editable content, extract a portion of it
7931 setText(text.text, TextView.BufferType.EDITABLE);
8434 * Set whether the TextView includes extra top and bottom padding to make
8455 * Gets whether the TextView includes extra top and bottom padding to make
9205 * TextView contains spannable text; otherwise it will do nothing.
9399 * Checks whether the transformation method applied to this TextView is set to ALL CAPS.
9493 * TextView has marquee enabled. Set to -1 to repeat indefinitely.
9505 * TextView has marquee enabled.
9528 * Set the TextView so that when it takes focus, all the text is
9545 * makes sense for editable TextView.
9567 * @return whether or not the cursor is visible (assuming this TextView is editable)
9646 * @param text The text the TextView is displaying
9669 * whenever this TextView's text changes.
9687 * whenever this TextView's text changes.
9796 afm.notifyValueChanged(TextView.this);
10168 * @return True iff this TextView contains a text that can be edited, or if this is
10169 * a selectable TextView.
10324 // must have been obtained using the TextView filter array which is not
10327 final TypedArray a = context.obtainStyledAttributes(R.styleable.TextView);
10410 * TextView. {@link #textCanBeSelected()} has to be true (this is one of the conditions to have
10419 * Test based on the <i>intrinsic</i> charateristics of the TextView.
10448 * in this TextView, based on the current spell checker settings,
10450 * Please note that a word iterator in this TextView is different from another word iterator
10451 * used by SpellChecker.java of TextView. This method should be used for the former.
10462 * @return {@code true} if this TextView is specialized for showing and interacting with the
10479 * @return {@code true} if this TextView supports auto-sizing text to fit within its container.
10491 * @return The locale that should be used for a spell checker in this TextView,
10555 return TextView.class.getName();
10678 // Extract style information that applies to the TextView as a whole.
10688 // Global styles can also be set via TextView.setPaintFlags().
10700 // TextView does not have its own text background color. A background is either part
10764 * Gets the {@link TextView}'s current text for AutoFill. The value is trimmed to 100K
11214 * @return True if the TextView is a current input method target; false otherwise.
11293 // For link action mode in a non-selectable/non-focusable TextView,
11374 * Return whether or not suggestions are enabled on this TextView. The suggestions are generated
11380 * TextView.
11432 * <p>Note that text selection mode is not started when a TextView receives focus and the
11470 * <p>Note that text insertion mode is not started when a TextView receives focus and the
11488 * Sets the {@link TextClassifier} for this TextView.
11495 * Returns the {@link TextClassifier} used by this TextView.
11496 * If no TextClassifier has been set, this TextView uses the default set by the
11549 * Returns true if this TextView uses a no-op TextClassifier.
11857 TextView.this.requestFocus();
12050 * A standard TextView (as well as buttons, checkboxes...) should not qualify and hence will
12170 * User interface state that is stored by TextView for implementing
12210 String str = "TextView.SavedState{"
12344 private final WeakReference<TextView> mView;
12359 Marquee(TextView v) {
12362 mView = new WeakReference<TextView>(v);
12401 final TextView textView = mView.get();
12402 if (textView != null && (textView.isFocused() || textView.isSelected())) {
12414 textView.invalidate();
12428 final TextView textView = mView.get();
12429 if (textView != null) textView.invalidate();
12438 final TextView textView = mView.get();
12439 if (textView != null && textView.mLayout != null) {
12442 final int textWidth = textView.getWidth() - textView.getCompoundPaddingLeft()
12443 - textView.getCompoundPaddingRight();
12444 final float lineWidth = textView.mLayout.getLineWidth(0);
12452 textView.invalidate();
12501 TextView.this.sendBeforeTextChanged(buffer, start, before, after);
12509 TextView.this.handleTextChanged(buffer, start, before, after);
12522 TextView.this.sendAfterTextChanged(buffer);
12525 MetaKeyKeyListener.stopSelecting(TextView.this, buffer);
12534 TextView.this.spanChange(buf, what, s, st, e, en);
12541 TextView.this.spanChange(buf, what, -1, s, -1, e);
12548 TextView.this.spanChange(buf, what, s, -1, e, -1);