# CompactDecimalFormat.CompactStyle

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

# CompactStyle

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/icu/text/CompactDecimalFormat.CompactStyle "View this page in Java")  

```
class CompactStyle
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                              |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\<[android.icu.text.CompactDecimalFormat.CompactStyle](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#)\> ||
|   | ↳ | [android.icu.text.CompactDecimalFormat.CompactStyle](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#) |

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [CompactDecimalFormat.CompactStyle.LONG](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:LONG),[CompactDecimalFormat.CompactStyle.SHORT](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:SHORT) |---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------| | [CompactDecimalFormat.CompactStyle.LONG](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:LONG)   | Longer version, like "1. | | [CompactDecimalFormat.CompactStyle.SHORT](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:SHORT) | Short version, like "1.  | |

Style parameter for CompactDecimalFormat.

## Summary

|                                                                      Enum values                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [LONG](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:LONG) Longer version, like "1.  |
| [SHORT](https://developer.android.com/reference/kotlin/android/icu/text/CompactDecimalFormat.CompactStyle#ENUM_VALUE:SHORT) Short version, like "1. |

## Enum values

### LONG

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

```
enum val LONG : CompactDecimalFormat.CompactStyle
```

Longer version, like "1.2 trillion", if available. May return same result as SHORT if not.  

### SHORT

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

```
enum val SHORT : CompactDecimalFormat.CompactStyle
```

Short version, like "1.2T"