# LocalePreferences.TemperatureUnit

# LocalePreferences.TemperatureUnit

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/text/util/LocalePreferences.java+class:androidx.core.text.util.LocalePreferences.TemperatureUnit)  
Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/text/util/LocalePreferences.TemperatureUnit "View this page in Java")

<br />

```
class LocalePreferences.TemperatureUnit
```

<br />

*** ** * ** ***

APIs to get the user's preference of temperature unit.

## Summary

|                                        ### Constants                                         |
|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [CELSIUS](https://developer.android.com/reference/kotlin/androidx/core/text/util/LocalePreferences.TemperatureUnit#CELSIUS())` = "celsius"` Celsius                     |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [DEFAULT](https://developer.android.com/reference/kotlin/androidx/core/text/util/LocalePreferences.TemperatureUnit#DEFAULT())` = ""` Default Temperature for the locale |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [FAHRENHEIT](https://developer.android.com/reference/kotlin/androidx/core/text/util/LocalePreferences.TemperatureUnit#FAHRENHEIT())` = "fahrenhe"` Fahrenheit           |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [KELVIN](https://developer.android.com/reference/kotlin/androidx/core/text/util/LocalePreferences.TemperatureUnit#KELVIN())` = "kelvin"` Kelvin                         |

## Constants

### CELSIUS

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val CELSIUS = "celsius": String!
```

Celsius  

### DEFAULT

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val DEFAULT = "": String!
```

Default Temperature for the locale  

### FAHRENHEIT

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val FAHRENHEIT = "fahrenhe": String!
```

Fahrenheit  

### KELVIN

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val KELVIN = "kelvin": String!
```

Kelvin