FixedDate


class FixedDate : Notification.Metric.MetricValue
kotlin.Any
   ↳ android.app.Notification.Metric.MetricValue
   ↳ android.app.Notification.Metric.FixedDate

A metric value for showing a date.

Summary

Constants
static Int

Formatting option.

static Int

Formatting option.

static Int

Formatting option.

Public constructors

Creates a FixedDate where the LocalDate will be displayed with FORMAT_AUTOMATIC.

FixedDate(value: LocalDate, format: Int)

Creates a FixedDate where the LocalDate will be displayed in the specified formatting option.

Public methods
Boolean
equals(other: Any?)

Int

The formatting option for the LocalDate value.

LocalDate

The LocalDate value.

Int

String

Constants

FORMAT_AUTOMATIC

static val FORMAT_AUTOMATIC: Int

Formatting option. The system will decide how to format the date, and whether to omit any pieces, depending on available space, the relationship between the LocalDate and the current date, etc.

Value: 0

FORMAT_LONG_DATE

static val FORMAT_LONG_DATE: Int

Formatting option. The date will be shown in a longer format, e.g. "Aug 13 2025" (according to the device's locale).

Value: 1

FORMAT_SHORT_DATE

static val FORMAT_SHORT_DATE: Int

Formatting option. The date will be shown in a shorter format, e.g. "13/8/25" (according to the device's locale).

Value: 2

Public constructors

FixedDate

FixedDate(value: LocalDate)

Creates a FixedDate where the LocalDate will be displayed with FORMAT_AUTOMATIC.

Parameters
value LocalDate: This value cannot be null.

FixedDate

FixedDate(
    value: LocalDate,
    format: Int)

Creates a FixedDate where the LocalDate will be displayed in the specified formatting option.

Parameters
value LocalDate: This value cannot be null.
format Int: Value is one of the following:

Public methods

equals

fun equals(other: Any?): Boolean

getFormat

fun getFormat(): Int

The formatting option for the LocalDate value.

Return
Int Value is one of the following:

getValue

fun getValue(): LocalDate

The LocalDate value.

Return
LocalDate This value cannot be null.

hashCode

fun hashCode(): Int

toString

fun toString(): String