# TimeTextDefaults

Artifact: [androidx.wear.compose:compose-material](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material/TimeText.kt+class:androidx.wear.compose.material.TimeTextDefaults) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)


```
object TimeTextDefaults
```

<br />

*** ** * ** ***

Contains the default values used by `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeText.composable#TimeText(androidx.compose.ui.Modifier,androidx.wear.compose.material.TimeSource,androidx.compose.ui.text.TextStyle,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1)`

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#TimeFormat12Hours()` Default format for 12h clock. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#TimeFormat24Hours()` Default format for 24h clock. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedScope.https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#(androidx.wear.compose.foundation.CurvedScope).CurvedTextSeparator(androidx.wear.compose.foundation.CurvedTextStyle,androidx.wear.compose.foundation.ArcPaddingValues)( curvedTextStyle: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedTextStyle?, contentArcPadding: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/ArcPaddingValues )` A default implementation of Separator shown between start/end content and the time on round screens |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#TextSeparator(androidx.compose.ui.Modifier,androidx.compose.ui.text.TextStyle,androidx.compose.foundation.layout.PaddingValues)( modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, textStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues )` A default implementation of Separator shown between start/end content and the time on square screens |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#timeFormat()()` Retrieves default timeFormat for the device. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeSource` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#timeSource(kotlin.String)(timeFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` A default implementation of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeSource`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#timeTextStyle(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit)(background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` with default parameters used for showing time on square screens. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#ContentPadding()` The default content padding used by `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeText.composable#TimeText(androidx.compose.ui.Modifier,androidx.wear.compose.material.TimeSource,androidx.compose.ui.text.TextStyle,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1)` |

## Constants

### TimeFormat12Hours

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
const val TimeFormat12Hours: String
```

Default format for 12h clock.

### TimeFormat24Hours

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
const val TimeFormat24Hours: String
```

Default format for 24h clock.

## Public functions

### CurvedScope.CurvedTextSeparator

Artifact: [androidx.wear.compose:compose-material](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material/TimeText.kt+function:CurvedTextSeparator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
fun CurvedScope.CurvedTextSeparator(
    curvedTextStyle: CurvedTextStyle? = null,
    contentArcPadding: ArcPaddingValues = ArcPaddingValues(angular = 4.dp)
): Unit
```

A default implementation of Separator shown between start/end content and the time on round screens

| Parameters |
|---|---|
| `curvedTextStyle: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedTextStyle? = null` | A `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedTextStyle` for the separator |
| `contentArcPadding: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/ArcPaddingValues = ArcPaddingValues(angular = 4.dp)` | An `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/ArcPaddingValues` for the separator text |

### TextSeparator

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
@Composable
fun TextSeparator(
    modifier: Modifier = Modifier,
    textStyle: TextStyle = timeTextStyle(),
    contentPadding: PaddingValues = PaddingValues(horizontal = 4.dp)
): Unit
```

A default implementation of Separator shown between start/end content and the time on square screens

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | A default modifier for the separator |
| `textStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = timeTextStyle()` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` for the separator |
| `contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues = PaddingValues(horizontal = 4.dp)` | The spacing values between the container and the separator |

### timeFormat

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
@Composable
fun timeFormat(): String
```

Retrieves default timeFormat for the device. Depending on settings, it can be either 12h or 24h format

### timeSource

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
fun timeSource(timeFormat: String): TimeSource
```

A default implementation of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeSource`. Once the system time changes, it triggers an update of the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeSource#currentTime()` which is formatted before that using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#timeSource(kotlin.String)` param.

Android implementation: `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/DefaultTimeSource` for Android uses `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeTextDefaults#timeSource(kotlin.String)` should follow the standard [Date and Time patterns](https://developer.android.com/reference/java/text/SimpleDateFormat#date-and-time-patterns) Examples: "h:mm a" - 12:08 PM "yyyy.MM.dd HH:mm:ss" - 2021.11.01 14:08:56 More examples can be found [here](https://developer.android.com/reference/java/text/SimpleDateFormat#examples)

Desktop implementation: TBD

| Parameters |
|---|---|
| `timeFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Date and time string pattern |

### timeTextStyle

Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.6.0)

```
@Composable
fun timeTextStyle(
    background: Color = Color.Unspecified,
    color: Color = Color.Unspecified,
    fontSize: TextUnit = TextUnit.Unspecified
): TextStyle
```

Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` with default parameters used for showing time on square screens. By default a copy of MaterialTheme.typography.caption1 style is created

| Parameters |
|---|---|
| `background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | The background color |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | The main color |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | The font size |

## Public properties

### ContentPadding

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

```
val ContentPadding: PaddingValues
```

The default content padding used by `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/TimeText.composable#TimeText(androidx.compose.ui.Modifier,androidx.wear.compose.material.TimeSource,androidx.compose.ui.text.TextStyle,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1,kotlin.Function0,kotlin.Function1)`