Object

RemoteTimeDefaults

Source set: JvmAndAndroid
public object RemoteTimeDefaults

Functions

is24HourFormat

Source set: JvmAndAndroid
@Composable
    public fun is24HourFormat(): RemoteBoolean

Returns a RemoteBoolean indicating whether the time should be displayed in 24-hour format. Currently captured at recording time.

Return

a RemoteBoolean that is true when 24-hour format is enabled

defaultTimeString

Source set: JvmAndAndroid
@Composable
    public fun defaultTimeString(is24HourFormat: RemoteBoolean = is24HourFormat()): RemoteString

Creates a RemoteString representing the current time in either 12-hour or 24-hour format.

The 24-hour format is represented as "HH:mm", while the 12-hour format is represented as "h:mm".

Parameters

is24HourFormat A RemoteBoolean indicating whether to use 24-hour format. Defaults to the system's current setting at the time of recording.

Return

A RemoteString that evaluates to the formatted time string.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: