TextViewCompat
Helper for accessing features in TextView.
Types
Link copied to clipboard
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the type of auto-size set for this widget.
Link copied to clipboard
Link copied to clipboard
Return the tint applied to any compound drawables.
Link copied to clipboard
Return the tint mode applied to any compound drawables.
Link copied to clipboard
Returns the distance between the first text baseline and the top of this TextView.
Link copied to clipboard
Returns the distance between the last text baseline and the bottom of this TextView.
Link copied to clipboard
Returns the maximum number of lines displayed in the given TextView, or -1 if the maximum height was set in pixels instead.
Link copied to clipboard
Returns the minimum number of lines displayed in the given TextView, or -1 if the minimum height was set in pixels instead.
Link copied to clipboard
Gets the parameters for text layout precomputation, for use with PrecomputedTextCompat.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds by using the default auto-size configuration.
Link copied to clipboard
Link copied to clipboard
open fun setCompoundDrawablesRelativeWithIntrinsicBounds(@NonNull textView: TextView, @Nullable start: Drawable, @Nullable top: Drawable, @Nullable end: Drawable, @Nullable bottom: Drawable)
open fun setCompoundDrawablesRelativeWithIntrinsicBounds(@NonNull textView: TextView, @DrawableRes start: Int, @DrawableRes top: Int, @DrawableRes end: Int, @DrawableRes bottom: Int)
Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text.
Link copied to clipboard
Applies a tint to any compound drawables.
Link copied to clipboard
open fun setCompoundDrawableTintMode(@NonNull textView: TextView, @Nullable tintMode: PorterDuff.Mode)
Applies a tint mode to any compound drawables.
Link copied to clipboard
open fun setCustomSelectionActionModeCallback(@NonNull textView: TextView, @NonNull callback: ActionMode.Callback)
Sets a selection action mode callback on a TextView.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets an explicit line height for this TextView.
open fun setLineHeight(@NonNull textView: TextView, unit: Int, @FloatRange(from = 0) lineHeight: Float)
Sets an explicit line height to a given unit and value for the TextView.
Link copied to clipboard
open fun setPrecomputedText(@NonNull textView: TextView, @NonNull precomputed: PrecomputedTextCompat)
Sets the PrecomputedTextCompat to the TextView If the given PrecomputeTextCompat is not compatible with textView, throws an IllegalArgumentException.
Link copied to clipboard
Sets the text appearance from the specified style resource.
Link copied to clipboard
open fun setTextMetricsParams(@NonNull textView: TextView, @NonNull params: PrecomputedTextCompat.Params)
Apply the text layout parameter.
Link copied to clipboard
open fun unwrapCustomSelectionActionModeCallback(@Nullable callback: ActionMode.Callback): ActionMode.Callback
Link copied to clipboard
open fun wrapCustomSelectionActionModeCallback(@NonNull textView: TextView, @Nullable callback: ActionMode.Callback): ActionMode.Callback