belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
TextViewCompat
public
final
class
TextViewCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.widget.TextViewCompat |
Helper for accessing features in TextView
.
Summary
Constants | |
---|---|
int |
AUTO_SIZE_TEXT_TYPE_NONE
The TextView does not auto-size text (default). |
int |
AUTO_SIZE_TEXT_TYPE_UNIFORM
The TextView scales text size both horizontally and vertically to fit within the container. |
Public methods | |
---|---|
static
int
|
getAutoSizeMaxTextSize(TextView textView)
|
static
int
|
getAutoSizeMinTextSize(TextView textView)
|
static
int
|
getAutoSizeStepGranularity(TextView textView)
|
static
int[]
|
getAutoSizeTextAvailableSizes(TextView textView)
|
static
int
|
getAutoSizeTextType(TextView textView)
Returns the type of auto-size set for this widget. |
static
Drawable[]
|
getCompoundDrawablesRelative(TextView textView)
Returns drawables for the start, top, end, and bottom borders from the given text view. |
static
int
|
getMaxLines(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(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
void
|
setAutoSizeTextTypeUniformWithConfiguration(TextView textView, int autoSizeMinTextSize, int autoSizeMaxTextSize, int autoSizeStepGranularity, int unit)
Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
static
void
|
setAutoSizeTextTypeUniformWithPresetSizes(TextView textView, int[] presetSizes, int unit)
Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
static
void
|
setAutoSizeTextTypeWithDefaults(TextView textView, int autoSizeTextType)
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
void
|
setCompoundDrawablesRelative(TextView textView, Drawable start, Drawable top, Drawable end, Drawable bottom)
Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |
static
void
|
setCompoundDrawablesRelativeWithIntrinsicBounds(TextView textView, Drawable start, Drawable top, Drawable end, Drawable bottom)
Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |