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 |
|
|
Creates a |
|
| Public methods | |
|---|---|
| Boolean | |
| Int |
The formatting option for the |
| LocalDate |
getValue()The |
| Int |
hashCode() |
| String |
toString() |
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: 0FORMAT_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: 1FORMAT_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: 2Public 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
getFormat
fun getFormat(): Int
The formatting option for the LocalDate value.
| Return | |
|---|---|
Int |
Value is one of the following: |
hashCode
fun hashCode(): Int
toString
fun toString(): String