public object TimeTextDefaults
Contains the default values used by TimeText
Functions
timeFormat
@Composable
public fun timeFormat(): String
Retrieves default timeFormat for the device. Depending on settings, it can be either 12h or 24h format
timeTextStyle
@Composable
public fun timeTextStyle(
background: Color = Color.Unspecified,
color: Color = Color.Unspecified,
fontSize: TextUnit = TextUnit.Unspecified,
): TextStyle
Creates a TextStyle with default parameters used for showing time on square screens. By default a copy of MaterialTheme.typography.caption1 style is created
Parameters
| background | The background color |
| color | The main color |
| fontSize | The font size |
TextSeparator
@Composable
public fun TextSeparator(
modifier: Modifier = Modifier,
textStyle: TextStyle = timeTextStyle(),
contentPadding: PaddingValues = PaddingValues(horizontal = 4.dp),
)
A default implementation of Separator shown between start/end content and the time on square screens
Parameters
| modifier | A default modifier for the separator |
| textStyle | A TextStyle for the separator |
| contentPadding | The spacing values between the container and the separator |
CurvedTextSeparator
public fun CurvedScope.CurvedTextSeparator(
curvedTextStyle: CurvedTextStyle? = null,
contentArcPadding: ArcPaddingValues = ArcPaddingValues(angular = 4.dp),
)
A default implementation of Separator shown between start/end content and the time on round screens
Parameters
| curvedTextStyle | A CurvedTextStyle for the separator |
| contentArcPadding | A ArcPaddingValues for the separator text |
timeSource
public fun timeSource(timeFormat: String): TimeSource
A default implementation of TimeSource. Once the system time changes, it triggers an update of the TimeSource.currentTime which is formatted before that using timeFormat param.
Android implementation: DefaultTimeSource for Android uses android.text.format.DateFormat timeFormat should follow the standard 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
Desktop implementation: TBD
Parameters
| timeFormat | Date and time string pattern |