TextViewCompat
class TextViewCompat
kotlin.Any | |
↳ | androidx.core.widget.TextViewCompat |
Helper for accessing features in TextView
.
Summary
Constants | |
---|---|
static Int |
The TextView does not auto-size text (default). |
static Int |
The TextView scales text size both horizontally and vertically to fit within the container. |
Public methods | |
---|---|
static Int |
getAutoSizeMaxTextSize(@NonNull textView: TextView) |
static Int |
getAutoSizeMinTextSize(@NonNull textView: TextView) |
static Int |
getAutoSizeStepGranularity(@NonNull textView: TextView) |
static IntArray |
getAutoSizeTextAvailableSizes(@NonNull textView: TextView) |
static Int |
getAutoSizeTextType(@NonNull textView: TextView) Returns the type of auto-size set for this widget. |
static ColorStateList? |
getCompoundDrawableTintList(@NonNull textView: TextView) Return the tint applied to any compound drawables. |
static Mode? |
getCompoundDrawableTintMode(@NonNull textView: TextView) Return the tint mode applied to any compound drawables. |
static Array<Drawable!> |
getCompoundDrawablesRelative(@NonNull textView: TextView) Returns drawables for the start, top, end, and bottom borders from the given text view. |
static Int |
getFirstBaselineToTopHeight(@NonNull textView: TextView) Returns the distance between the first text baseline and the top of this TextView. |
static Int |
getLastBaselineToBottomHeight(@NonNull textView: TextView) Returns the distance between the last text baseline and the bottom of this TextView. |
static Int |
getMaxLines(@NonNull textView: TextView) Returns the maximum number of lines displayed in the given TextView, or -1 if the maximum height was set in pixels instead. |
static Int |
getMinLines(@NonNull textView: TextView) Returns the minimum number of lines displayed in the given TextView, or -1 if the minimum height was set in pixels instead. |
static PrecomputedTextCompat.Params |
getTextMetricsParams(@NonNull textView: TextView) Gets the parameters for text layout precomputation, for use with |
static Unit |
setAutoSizeTextTypeUniformWithConfiguration(@NonNull textView: TextView, autoSizeMinTextSize: Int, autoSizeMaxTextSize: Int, autoSizeStepGranularity: Int, unit: Int) Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
static Unit |
setAutoSizeTextTypeUniformWithPresetSizes(@NonNull textView: TextView, @NonNull presetSizes: IntArray, unit: Int) Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
static Unit |
setAutoSizeTextTypeWithDefaults(@NonNull textView: TextView, autoSizeTextType: Int) 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. |
static Unit |
setCompoundDrawableTintList(@NonNull textView: TextView, @Nullable tint: ColorStateList?) Applies a tint to any compound drawables. |
static Unit |
setCompoundDrawableTintMode(@NonNull textView: TextView, @Nullable tintMode: Mode?) Applies a tint mode to any compound drawables. |
static Unit |
setCompoundDrawablesRelative(@NonNull textView: TextView, @Nullable start: Drawable?, @Nullable top: Drawable?, @Nullable end: Drawable?, @Nullable bottom |