# TextViewCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#constants)\|[Methods](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#)  

# TextViewCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
TextViewCompat
`  
`

extends Object


``


`

|---|------------------------------------------|
| java.lang.Object                            ||
| ↳ | android.support.v4.widget.TextViewCompat |

<br />

*** ** * ** ***

Helper for accessing features in[TextView](https://developer.android.com/reference/android/widget/TextView.html).

## Summary

|                                                                                                                 ### Constants                                                                                                                  ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [AUTO_SIZE_TEXT_TYPE_NONE](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_NONE) The TextView does not auto-size text (default).                                                   |
| `int` | [AUTO_SIZE_TEXT_TYPE_UNIFORM](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_UNIFORM) The TextView scales text size both horizontally and vertically to fit within the container. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ||
|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int`                                                                                           | ` `[getAutoSizeMaxTextSize](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getAutoSizeMaxTextSize(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` static int`                                                                                           | ` `[getAutoSizeMinTextSize](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getAutoSizeMinTextSize(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` static int`                                                                                           | ` `[getAutoSizeStepGranularity](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getAutoSizeStepGranularity(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` static int[]`                                                                                         | ` `[getAutoSizeTextAvailableSizes](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getAutoSizeTextAvailableSizes(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` static int`                                                                                           | ` `[getAutoSizeTextType](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getAutoSizeTextType(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) ` Returns the type of auto-size set for this widget.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` static `[Drawable[]](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getCompoundDrawablesRelative](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getCompoundDrawablesRelative(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView) ` Returns drawables for the start, top, end, and bottom borders from the given text view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` static int`                                                                                           | ` `[getMaxLines](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getMaxLines(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` 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](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#getMinLines(android.widget.TextView))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` 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](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setAutoSizeTextTypeUniformWithConfiguration(android.widget.TextView, int, int, int, int))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` 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](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setAutoSizeTextTypeUniformWithPresetSizes(android.widget.TextView, int[], int))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` 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](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setAutoSizeTextTypeWithDefaults(android.widget.TextView, int))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` 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](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setCompoundDrawablesRelative(android.widget.TextView, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` start, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` top, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` end, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text.                                       |
| ` static void`                                                                                          | ` `[setCompoundDrawablesRelativeWithIntrinsicBounds](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setCompoundDrawablesRelativeWithIntrinsicBounds(android.widget.TextView, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` start, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` top, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` end, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |
| ` static void`                                                                                          | ` `[setCompoundDrawablesRelativeWithIntrinsicBounds](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setCompoundDrawablesRelativeWithIntrinsicBounds(android.widget.TextView, int, int, int, int))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView, int start, int top, int end, int bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` static void`                                                                                          | ` `[setCustomSelectionActionModeCallback](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setCustomSelectionActionModeCallback(android.widget.TextView, android.view.ActionMode.Callback))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView, `[ActionMode.Callback](https://developer.android.com/reference/android/view/ActionMode.Callback.html)` callback) ` Sets a selection action mode callback on a TextView.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` static void`                                                                                          | ` `[setTextAppearance](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#setTextAppearance(android.widget.TextView, int))`(`[TextView](https://developer.android.com/reference/android/widget/TextView.html)` textView, int resId) ` Sets the text appearance from the specified style resource.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### AUTO_SIZE_TEXT_TYPE_NONE

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AUTO_SIZE_TEXT_TYPE_NONE
```

The TextView does not auto-size text (default).

<br />

Constant Value: 0 (0x00000000)  

### AUTO_SIZE_TEXT_TYPE_UNIFORM

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AUTO_SIZE_TEXT_TYPE_UNIFORM
```

The TextView scales text size both horizontally and vertically to fit within the container.

<br />

Constant Value: 1 (0x00000001)

## Public methods

### getAutoSizeMaxTextSize

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAutoSizeMaxTextSize (TextView textView)
```

<br />

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                                                                              Returns                                                                              ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the current auto-size maximum text size in pixels (the default is 112sp). Note that if auto-size has not been configured this function returns`-1`. <br /> |

### getAutoSizeMinTextSize

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAutoSizeMinTextSize (TextView textView)
```

<br />

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                                                                             Returns                                                                              ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the current auto-size minimum text size in pixels (the default is 12sp). Note that if auto-size has not been configured this function returns`-1`. <br /> |

### getAutoSizeStepGranularity

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAutoSizeStepGranularity (TextView textView)
```

<br />

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                             Returns                             ||
|-------|----------------------------------------------------------|
| `int` | the current auto-size step granularity in pixels. <br /> |

### getAutoSizeTextAvailableSizes

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int[] getAutoSizeTextAvailableSizes (TextView textView)
```

<br />

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                              Returns                               ||
|---------|-----------------------------------------------------------|
| `int[]` | the current auto-size`int`sizes array (in pixels). <br /> |

### getAutoSizeTextType

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAutoSizeTextType (TextView textView)
```

Returns the type of auto-size set for this widget.

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                                                                                                                                                                       Returns                                                                                                                                                                       ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | an`int`corresponding to one of the auto-size types:[AUTO_SIZE_TEXT_TYPE_NONE](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_NONE)or[AUTO_SIZE_TEXT_TYPE_UNIFORM](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_UNIFORM) <br /> |

### getCompoundDrawablesRelative

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Drawable[] getCompoundDrawablesRelative (TextView textView)
```

Returns drawables for the start, top, end, and bottom borders from the given text view.

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|                                                Returns                                                ||
|-----------------------------------------------------------------------------------------------|--------|
| [Drawable[]](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | <br /> |

### getMaxLines

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getMinLines

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|          Parameters           ||
|------------|-------------------|
| `textView` | `TextView` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### setAutoSizeTextTypeUniformWithConfiguration

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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. If all the configuration params are valid the type of auto-size is set to[AUTO_SIZE_TEXT_TYPE_UNIFORM](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_UNIFORM).

<br />

|                                                                                                            Parameters                                                                                                             ||
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `textView`                | `TextView` <br />                                                                                                                                                                                      |
| `autoSizeMinTextSize`     | `int`: the minimum text size available for auto-size <br />                                                                                                                                            |
| `autoSizeMaxTextSize`     | `int`: the maximum text size available for auto-size <br />                                                                                                                                            |
| `autoSizeStepGranularity` | `int`: the auto-size step granularity. It is used in conjunction with the minimum and maximum text size in order to build the set of text sizes the system uses to choose from when auto-sizing <br /> |
| `unit`                    | `int`: the desired dimension unit for all sizes above. See[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)for the possible dimension units <br />                    |

|                                   Throws                                    ||
|----------------------------|-------------------------------------------------|
| `IllegalArgumentException` | if any of the configuration params are invalid. |

### setAutoSizeTextTypeUniformWithPresetSizes

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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. If at least one value from the`presetSizes`is valid then the type of auto-size is set to[AUTO_SIZE_TEXT_TYPE_UNIFORM](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_UNIFORM).

<br />

|                                                                                                Parameters                                                                                                 ||
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `textView`    | `TextView` <br />                                                                                                                                                                          |
| `presetSizes` | `int`: an`int`array of sizes in pixels <br />                                                                                                                                              |
| `unit`        | `int`: the desired dimension unit for the preset sizes above. See[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)for the possible dimension units <br /> |

|                                Throws                                ||
|----------------------------|------------------------------------------|
| `IllegalArgumentException` | if all of the`presetSizes`are invalid. _ |

### setAutoSizeTextTypeWithDefaults

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                                                                                                                                                                        Parameters                                                                                                                                                                         ||
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `textView`         | `TextView` <br />                                                                                                                                                                                                                                                                                                                     |
| `autoSizeTextType` | `int`: the type of auto-size. Must be one of[AUTO_SIZE_TEXT_TYPE_NONE](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_NONE)or[AUTO_SIZE_TEXT_TYPE_UNIFORM](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat#AUTO_SIZE_TEXT_TYPE_UNIFORM) <br /> |

### setCompoundDrawablesRelative

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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. Use`null`if you do not want a Drawable there. The Drawables must already have had[setBounds(Rect)](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect))called.

<br />

Calling this method will overwrite any Drawables previously set using[setCompoundDrawables(Drawable, Drawable, Drawable, Drawable)](https://developer.android.com/reference/android/widget/TextView.html#setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable))or related methods.

<br />

<br />

|                                   Parameters                                    ||
|------------|---------------------------------------------------------------------|
| `textView` | `TextView`: The TextView against which to invoke the method. <br /> |
| `start`    | `Drawable` <br />                                                   |
| `top`      | `Drawable` <br />                                                   |
| `end`      | `Drawable` <br />                                                   |
| `bottom`   | `Drawable` <br />                                                   |

### setCompoundDrawablesRelativeWithIntrinsicBounds

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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. Use`null`if you do not want a Drawable there. The Drawables' bounds will be set to their intrinsic bounds.

<br />

Calling this method will overwrite any Drawables previously set using[setCompoundDrawables(Drawable, Drawable, Drawable, Drawable)](https://developer.android.com/reference/android/widget/TextView.html#setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable))or related methods.

<br />

<br />

|                                   Parameters                                    ||
|------------|---------------------------------------------------------------------|
| `textView` | `TextView`: The TextView against which to invoke the method. <br /> |
| `start`    | `Drawable` <br />                                                   |
| `top`      | `Drawable` <br />                                                   |
| `end`      | `Drawable` <br />                                                   |
| `bottom`   | `Drawable` <br />                                                   |

### setCompoundDrawablesRelativeWithIntrinsicBounds

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCompoundDrawablesRelativeWithIntrinsicBounds (TextView textView, 
                int start, 
                int top, 
                int end, 
                int bottom)
```

Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. Use 0 if you do not want a Drawable there. The Drawables' bounds will be set to their intrinsic bounds.

<br />

Calling this method will overwrite any Drawables previously set using[setCompoundDrawables(Drawable, Drawable, Drawable, Drawable)](https://developer.android.com/reference/android/widget/TextView.html#setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable))or related methods.

<br />

<br />

|                                   Parameters                                    ||
|------------|---------------------------------------------------------------------|
| `textView` | `TextView`: The TextView against which to invoke the method. <br /> |
| `start`    | `int`: Resource identifier of the start Drawable. <br />            |
| `top`      | `int`: Resource identifier of the top Drawable. <br />              |
| `end`      | `int`: Resource identifier of the end Drawable. <br />              |
| `bottom`   | `int`: Resource identifier of the bottom Drawable. <br />           |

### setCustomSelectionActionModeCallback

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCustomSelectionActionModeCallback (TextView textView, 
                ActionMode.Callback callback)
```

Sets a selection action mode callback on a TextView. Also this method can be used to fix a bug in framework SDK 26. On these affected devices, the bug causes the menu containing the options for handling ACTION_PROCESS_TEXT after text selection to miss a number of items. This method can be used to fix this wrong behaviour for a text view, by passing any custom callback implementation. If no custom callback is desired, a no-op implementation should be provided. Note that, by default, the bug will only be fixed when the default floating toolbar menu implementation is used. If a custom implementation of[Menu](https://developer.android.com/reference/android/view/Menu.html)is provided, this should provide the method Menu#removeItemAt(int) which removes a menu item by its position, as given by Menu#getItem(int). Also, the following post condition should hold: a call to removeItemAt(i), should not modify the results of getItem(j) for any j \< i. Intuitively, removing an element from the menu should behave as removing an element from a list. Note that this method does not exist in the[Menu](https://developer.android.com/reference/android/view/Menu.html)interface. However, it is required, and going to be called by reflection, in order to display the correct process text items in the menu.

<br />

|                                            Parameters                                            ||
|------------|--------------------------------------------------------------------------------------|
| `textView` | `TextView`: The TextView to set the action selection mode callback on. <br />        |
| `callback` | `ActionMode.Callback`: The action selection mode callback to set on textView. <br /> |

### setTextAppearance

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTextAppearance (TextView textView, 
                int resId)
```

Sets the text appearance from the specified style resource.

Use a framework-defined`TextAppearance`style like[@android:style/TextAppearance.Material.Body1](https://developer.android.com/reference/android/R.style#TextAppearance_Material_Body1).

<br />

|                                   Parameters                                    ||
|------------|---------------------------------------------------------------------|
| `textView` | `TextView`: The TextView against which to invoke the method. <br /> |
| `resId`    | `int`: The resource identifier of the style to apply. <br />        |

-

  ## Interfaces

  - [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)
  - [NestedScrollView.OnScrollChangeListener](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.OnScrollChangeListener)
  - [SimpleCursorAdapter.CursorToStringConverter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.CursorToStringConverter)
  - [SimpleCursorAdapter.ViewBinder](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.ViewBinder)
  - [SlidingPaneLayout.PanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.PanelSlideListener)
  - [SwipeRefreshLayout.OnChildScrollUpCallback](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnChildScrollUpCallback)
  - [SwipeRefreshLayout.OnRefreshListener](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnRefreshListener)
  - [TintableCompoundButton](https://developer.android.com/reference/android/support/v4/widget/TintableCompoundButton)
-

  ## Classes

  - [AutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/AutoScrollHelper)
  - [CircularProgressDrawable](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable)
  - [CompoundButtonCompat](https://developer.android.com/reference/android/support/v4/widget/CompoundButtonCompat)
  - [ContentLoadingProgressBar](https://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar)
  - [CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)
  - [DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)
  - [DrawerLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.LayoutParams)
  - [DrawerLayout.SavedState](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SavedState)
  - [DrawerLayout.SimpleDrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SimpleDrawerListener)
  - [EdgeEffectCompat](https://developer.android.com/reference/android/support/v4/widget/EdgeEffectCompat)
  - [ExploreByTouchHelper](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper)
  - [ImageViewCompat](https://developer.android.com/reference/android/support/v4/widget/ImageViewCompat)
  - [ListPopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/ListPopupWindowCompat)
  - [ListViewAutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/ListViewAutoScrollHelper)
  - [ListViewCompat](https://developer.android.com/reference/android/support/v4/widget/ListViewCompat)
  - [NestedScrollView](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView)
  - [PopupMenuCompat](https://developer.android.com/reference/android/support/v4/widget/PopupMenuCompat)
  - [PopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/PopupWindowCompat)
  - [ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter)
  - [ScrollerCompat](https://developer.android.com/reference/android/support/v4/widget/ScrollerCompat)
  - [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter)
  - [SlidingPaneLayout](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout)
  - [SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.LayoutParams)
  - [SlidingPaneLayout.SimplePanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.SimplePanelSlideListener)
  - [Space](https://developer.android.com/reference/android/support/v4/widget/Space)
  - [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout)
  - [TextViewCompat](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat)
  - [ViewDragHelper](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper)
  - [ViewDragHelper.Callback](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.Callback)