Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Enums](https://developer.android.com/reference/java/time/format/TextStyle#enumconstants) \| [Methods](https://developer.android.com/reference/java/time/format/TextStyle#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/time/format/TextStyle#inhmethods)

# TextStyle


`
public

final

enum
TextStyle
`


`


`

`

extends https://developer.android.com/reference/java/lang/Enum<https://developer.android.com/reference/java/time/format/TextStyle>


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.lang.Enum](https://developer.android.com/reference/java/lang/Enum)\<[java.time.format.TextStyle](https://developer.android.com/reference/java/time/format/TextStyle)\> ||
|   | ↳ | java.time.format.TextStyle |

<br />

*** ** * ** ***

Enumeration of the style of text formatting and parsing.


Text styles define three sizes for the formatted text - 'full', 'short' and 'narrow'.
Each of these three sizes is available in both 'standard' and 'stand-alone' variations.


The difference between the three sizes is obvious in most languages.
For example, in English the 'full' month is 'January', the 'short' month is 'Jan'
and the 'narrow' month is 'J'. Note that the narrow size is often not unique.
For example, 'January', 'June' and 'July' all have the 'narrow' text 'J'.


The difference between the 'standard' and 'stand-alone' forms is trickier to describe
as there is no difference in English. However, in other languages there is a difference
in the word used when the text is used alone, as opposed to in a complete date.
For example, the word used for a month when used alone in a date picker is different
to the word used for month in association with a day and year in a date.

## Summary

| ### Enum values ||
|---|---|
| `https://developer.android.com/reference/java/time/format/TextStyle` | `FULL` Full text, typically the full description. |
| `https://developer.android.com/reference/java/time/format/TextStyle` | `FULL_STANDALONE` Full text for stand-alone use, typically the full description. |
| `https://developer.android.com/reference/java/time/format/TextStyle` | `NARROW` Narrow text, typically a single letter. |
| `https://developer.android.com/reference/java/time/format/TextStyle` | `NARROW_STANDALONE` Narrow text for stand-alone use, typically a single letter. |
| `https://developer.android.com/reference/java/time/format/TextStyle` | `SHORT` Short text, typically an abbreviation. |
| `https://developer.android.com/reference/java/time/format/TextStyle` | `SHORT_STANDALONE` Short text for stand-alone use, typically an abbreviation. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/time/format/TextStyle` | ` https://developer.android.com/reference/java/time/format/TextStyle#asNormal()() ` Returns the normal style with the same size. |
| ` https://developer.android.com/reference/java/time/format/TextStyle` | ` https://developer.android.com/reference/java/time/format/TextStyle#asStandalone()() ` |
| ` boolean` | ` https://developer.android.com/reference/java/time/format/TextStyle#isStandalone()() ` Returns true if the Style is a stand-alone style. |
| ` static https://developer.android.com/reference/java/time/format/TextStyle` | ` https://developer.android.com/reference/java/time/format/TextStyle#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String name) ` |
| ` static final https://developer.android.com/reference/java/time/format/TextStyle` | ` https://developer.android.com/reference/java/time/format/TextStyle#values()() ` |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Enum ` |---|---| | ` final https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Enum#clone()() ` Throws CloneNotSupportedException. | | ` final int` | ` https://developer.android.com/reference/java/lang/Enum#compareTo(E)(https://developer.android.com/reference/java/time/format/TextStyle o) ` Compares this enum with the specified object for order. | | ` final boolean` | ` https://developer.android.com/reference/java/lang/Enum#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object other) ` Returns true if the specified object is equal to this enum constant. | | ` final void` | ` https://developer.android.com/reference/java/lang/Enum#finalize()() ` enum classes cannot have finalize methods. | | ` final https://developer.android.com/reference/java/lang/Class<https://developer.android.com/reference/java/time/format/TextStyle>` | ` https://developer.android.com/reference/java/lang/Enum#getDeclaringClass()() ` Returns the Class object corresponding to this enum constant's enum type. | | ` final int` | ` https://developer.android.com/reference/java/lang/Enum#hashCode()() ` Returns a hash code for this enum constant. | | ` final https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Enum#name()() ` Returns the name of this enum constant, exactly as declared in its enum declaration. | | ` final int` | ` https://developer.android.com/reference/java/lang/Enum#ordinal()() ` Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero). | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Enum#toString()() ` Returns the name of this enum constant, as contained in the declaration. | | ` static <T extends https://developer.android.com/reference/java/lang/Enum<T>> T` | ` https://developer.android.com/reference/java/lang/Enum#valueOf(java.lang.Class<T>,%20java.lang.String)(https://developer.android.com/reference/java/lang/Class<T> enumClass, https://developer.android.com/reference/java/lang/String name) ` Returns the enum constant of the specified enum class with the specified name. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/java/lang/Comparable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/java/lang/Comparable#compareTo(T)(https://developer.android.com/reference/java/time/format/TextStyle o) ` Compares this object with the specified object for order. | ||

## Enum values

### FULL

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle FULL
```

Full text, typically the full description.
For example, day-of-week Monday might output "Monday".

<br />

### FULL_STANDALONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle FULL_STANDALONE
```

Full text for stand-alone use, typically the full description.
For example, day-of-week Monday might output "Monday".

<br />

### NARROW

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle NARROW
```

Narrow text, typically a single letter.
For example, day-of-week Monday might output "M".

<br />

### NARROW_STANDALONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle NARROW_STANDALONE
```

Narrow text for stand-alone use, typically a single letter.
For example, day-of-week Monday might output "M".

<br />

### SHORT

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle SHORT
```

Short text, typically an abbreviation.
For example, day-of-week Monday might output "Mon".

<br />

### SHORT_STANDALONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final TextStyle SHORT_STANDALONE
```

Short text for stand-alone use, typically an abbreviation.
For example, day-of-week Monday might output "Mon".

<br />

## Public methods

### asNormal

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextStyle asNormal ()
```

Returns the normal style with the same size.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/format/TextStyle` | the normal style with the same size <br /> |

### asStandalone

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextStyle asStandalone ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/format/TextStyle` | the stand-alone style with the same size <br /> |

### isStandalone

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isStandalone ()
```

Returns true if the Style is a stand-alone style.

<br />

| Returns ||
|---|---|
| `boolean` | true if the style is a stand-alone style. <br /> |

### valueOf

```
public static TextStyle valueOf (String name)
```

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/format/TextStyle` | <br /> |

### values

```
public static final TextStyle[] values ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/format/TextStyle` | <br /> |